home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1994-11-17 | 60.9 KB | [TEXT/MMCC] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
66%
| dexvert
| Compact Compressed (Unix) (archive/compact)
| ext
| Supported |
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, Thu Nov 17 00:26:07 1994, modified Thu Nov 17 00:26:07 1994, creator 'MMCC', type ASCII, 59090 bytes "Assign.c" , at 0xe752 3012 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MMCC] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 41 73 73 69 67 6e | 2e 63 00 00 00 00 00 00 |..Assign|.c......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 00 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 e6 d2 00 | 00 0b c4 aa f0 99 ef aa |........|........|
|00000060| f0 99 ef 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 65 87 00 00 |........|....e...|
|00000080| 2f 2a 0d 41 73 73 69 67 | 6e 2e 63 0d 0d 41 73 73 |/*.Assig|n.c..Ass|
|00000090| 69 67 6e 20 69 73 20 61 | 20 70 6f 72 74 61 62 6c |ign is a| portabl|
|000000a0| 65 20 72 75 6e 74 69 6d | 65 20 43 20 69 6e 74 65 |e runtim|e C inte|
|000000b0| 72 70 72 65 74 65 72 20 | 74 68 61 74 20 72 65 61 |rpreter |that rea|
|000000c0| 64 73 20 61 6e 64 20 65 | 78 65 63 75 74 65 73 20 |ds and e|xecutes |
|000000d0| 61 6e 79 20 74 65 78 74 | 0d 22 61 73 73 69 67 6e |any text|."assign|
|000000e0| 6d 65 6e 74 22 20 66 69 | 6c 65 20 74 68 61 74 20 |ment" fi|le that |
|000000f0| 63 6f 6e 74 61 69 6e 73 | 20 6f 6e 6c 79 20 43 20 |contains| only C |
|00000100| 61 73 73 69 67 6e 6d 65 | 6e 74 73 20 61 6e 64 20 |assignme|nts and |
|00000110| 63 6f 6d 6d 65 6e 74 73 | 2c 20 65 2e 67 2e 0d 09 |comments|, e.g...|
|00000120| 76 69 65 77 69 6e 67 44 | 69 73 74 61 6e 63 65 3d |viewingD|istance=|
|00000130| 35 37 2e 30 3b 09 2f 2f | 20 69 6e 63 68 65 73 0d |57.0;.//| inches.|
|00000140| 09 0d 53 65 65 20 41 73 | 73 69 67 6e 2e 6e 6f 74 |..See As|sign.not|
|00000150| 65 20 66 6f 72 20 64 6f | 63 75 6d 65 6e 74 61 74 |e for do|cumentat|
|00000160| 69 6f 6e 2e 0d 0d 28 49 | 74 20 77 6f 75 6c 64 20 |ion...(I|t would |
|00000170| 62 65 20 6e 69 63 65 20 | 74 6f 20 61 64 64 20 61 |be nice |to add a|
|00000180| 20 66 6c 61 67 20 66 6f | 72 20 50 72 69 6e 74 41 | flag fo|r PrintA|
|00000190| 73 73 69 67 6e 6d 65 6e | 74 73 54 6f 46 69 6c 65 |ssignmen|tsToFile|
|000001a0| 28 29 20 74 68 61 74 20 | 77 6f 75 6c 64 20 72 65 |() that |would re|
|000001b0| 71 75 65 73 74 0d 61 20 | 72 65 61 64 2d 61 66 74 |quest.a |read-aft|
|000001c0| 65 72 2d 77 72 69 74 65 | 20 63 68 65 63 6b 2c 20 |er-write| check, |
|000001d0| 61 6c 61 20 57 72 69 74 | 65 4c 75 6d 69 6e 61 6e |ala Writ|eLuminan|
|000001e0| 63 65 52 65 63 6f 72 64 | 20 69 6e 20 52 65 61 64 |ceRecord| in Read|
|000001f0| 4c 75 6d 69 6e 61 6e 63 | 65 52 65 63 6f 72 64 2e |Luminanc|eRecord.|
|00000200| 63 2e 29 0d 0d 48 49 53 | 54 4f 52 59 0d 37 2f 33 |c.)..HIS|TORY.7/3|
|00000210| 30 2f 39 31 20 64 67 70 | 09 77 72 6f 74 65 20 69 |0/91 dgp|.wrote i|
|00000220| 74 20 61 73 20 22 52 65 | 61 64 41 73 73 69 67 6e |t as "Re|adAssign|
|00000230| 6d 65 6e 74 73 2e 63 22 | 2e 0d 38 2f 34 2f 39 31 |ments.c"|..8/4/91|
|00000240| 09 64 67 70 20 61 64 64 | 65 64 20 6e 65 77 20 72 |.dgp add|ed new r|
|00000250| 6f 75 74 69 6e 65 73 20 | 61 6e 64 20 72 65 6e 61 |outines |and rena|
|00000260| 6d 65 64 20 74 68 65 20 | 6f 6c 64 20 6f 6e 65 73 |med the |old ones|
|00000270| 2e 20 45 76 65 72 79 74 | 68 69 6e 67 0d 09 09 09 |. Everyt|hing....|
|00000280| 73 65 65 6d 73 20 74 6f | 20 77 6f 72 6b 2c 20 62 |seems to| work, b|
|00000290| 75 74 20 68 61 73 20 6e | 6f 74 20 62 65 65 6e 20 |ut has n|ot been |
|000002a0| 74 68 6f 72 6f 75 67 68 | 6c 79 20 74 65 73 74 65 |thorough|ly teste|
|000002b0| 64 2e 0d 38 2f 35 2f 39 | 31 09 64 67 70 09 4d 50 |d..8/5/9|1.dgp.MP|
|000002c0| 57 20 43 20 33 2e 32 20 | 6e 6f 77 20 63 6f 6d 70 |W C 3.2 |now comp|
|000002d0| 69 6c 65 73 20 69 74 20 | 77 69 74 68 6f 75 74 20 |iles it |without |
|000002e0| 65 72 72 6f 72 20 6d 65 | 73 73 61 67 65 73 2e 20 |error me|ssages. |
|000002f0| 54 68 65 20 4d 50 57 20 | 43 20 6d 61 63 72 6f 20 |The MPW |C macro |
|00000300| 70 72 6f 63 65 73 73 6f | 72 2c 0d 09 09 09 63 6f |processo|r,....co|
|00000310| 6e 74 72 61 72 79 20 74 | 6f 20 53 74 61 6e 64 61 |ntrary t|o Standa|
|00000320| 72 64 20 43 2c 20 66 69 | 6e 64 73 20 63 6f 6d 6d |rd C, fi|nds comm|
|00000330| 65 6e 74 20 73 79 6d 62 | 6f 6c 73 20 69 6e 73 69 |ent symb|ols insi|
|00000340| 64 65 20 73 74 72 69 6e | 67 73 20 61 6e 64 20 66 |de strin|gs and f|
|00000350| 69 6e 64 73 20 0d 09 09 | 09 70 72 65 70 72 6f 63 |inds ...|.preproc|
|00000360| 65 73 73 6f 72 20 64 69 | 72 65 63 74 69 76 65 73 |essor di|rectives|
|00000370| 20 65 76 65 6e 20 77 68 | 65 6e 20 23 20 69 73 20 | even wh|en # is |
|00000380| 6e 6f 74 20 74 68 65 20 | 66 69 72 73 74 20 6e 6f |not the |first no|
|00000390| 6e 62 6c 61 6e 6b 20 63 | 68 61 72 61 63 74 65 72 |nblank c|haracter|
|000003a0| 2e 0d 38 2f 32 34 2f 39 | 31 09 64 67 70 09 4d 61 |..8/24/9|1.dgp.Ma|
|000003b0| 64 65 20 63 6f 6d 70 61 | 74 69 62 6c 65 20 77 69 |de compa|tible wi|
|000003c0| 74 68 20 54 48 49 4e 4b | 20 43 20 35 2e 30 2e 0d |th THINK| C 5.0..|
|000003d0| 09 09 09 43 68 61 6e 67 | 65 64 20 52 65 61 64 41 |...Chang|ed ReadA|
|000003e0| 73 73 69 67 6e 6d 65 6e | 74 20 66 69 6c 65 20 74 |ssignmen|t file t|
|000003f0| 6f 20 72 65 74 75 72 6e | 20 61 6e 20 65 72 72 6f |o return| an erro|
|00000400| 72 20 63 6f 64 65 20 69 | 6e 73 74 65 61 64 20 6f |r code i|nstead o|
|00000410| 66 20 61 62 6f 72 74 69 | 6e 67 0d 09 09 09 69 66 |f aborti|ng....if|
|00000420| 20 69 74 20 63 61 6e 27 | 74 20 6f 70 65 6e 20 74 | it can'|t open t|
|00000430| 68 65 20 66 69 6c 65 2e | 0d 38 2f 32 36 2f 39 31 |he file.|.8/26/91|
|00000440| 09 64 67 70 09 41 64 64 | 65 64 20 53 65 74 56 61 |.dgp.Add|ed SetVa|
|00000450| 72 69 61 62 6c 65 28 29 | 20 61 6e 64 20 6e 6f 74 |riable()| and not|
|00000460| 65 64 2c 20 69 6e 20 41 | 73 73 69 67 6e 2e 6e 6f |ed, in A|ssign.no|
|00000470| 74 65 2c 20 74 68 61 74 | 20 74 68 65 20 56 61 72 |te, that| the Var|
|00000480| 69 61 62 6c 65 20 61 72 | 72 61 79 0d 09 09 09 69 |iable ar|ray....i|
|00000490| 73 20 74 65 72 6d 69 6e | 61 74 65 64 20 62 79 20 |s termin|ated by |
|000004a0| 61 6e 20 65 6c 65 6d 65 | 6e 74 20 77 69 74 68 20 |an eleme|nt with |
|000004b0| 69 74 73 20 22 74 79 70 | 65 22 20 66 69 65 6c 64 |its "typ|e" field|
|000004c0| 20 73 65 74 20 74 6f 20 | 7a 65 72 6f 2e 20 28 54 | set to |zero. (T|
|000004d0| 68 61 6e 6b 73 0d 09 09 | 09 74 6f 20 45 76 61 6e |hanks...|.to Evan|
|000004e0| 20 52 65 6c 6b 69 6e 20 | 66 6f 72 20 70 6f 69 6e | Relkin |for poin|
|000004f0| 74 69 6e 67 20 6f 75 74 | 20 74 68 65 20 6f 6d 69 |ting out| the omi|
|00000500| 73 73 69 6f 6e 2e 29 0d | 34 2f 31 2f 39 32 09 64 |ssion.).|4/1/92.d|
|00000510| 67 70 09 54 69 64 69 65 | 64 20 75 70 20 41 73 73 |gp.Tidie|d up Ass|
|00000520| 69 67 6e 2e 6e 6f 74 65 | 2e 0d 34 2f 32 2f 39 32 |ign.note|..4/2/92|
|00000530| 09 64 67 70 20 49 6e 74 | 72 6f 64 75 63 65 64 20 |.dgp Int|roduced |
|00000540| 52 65 61 64 41 73 73 69 | 67 6e 6d 65 6e 74 42 6c |ReadAssi|gnmentBl|
|00000550| 6f 63 6b 28 29 20 61 6e | 64 20 41 73 73 69 67 6e |ock() an|d Assign|
|00000560| 6d 65 6e 74 4c 69 6e 65 | 57 61 73 42 6c 61 6e 6b |mentLine|WasBlank|
|00000570| 28 29 2e 20 0d 09 09 09 | 44 65 6c 65 74 65 64 20 |(). ....|Deleted |
|00000580| 52 65 61 64 41 73 73 69 | 67 6e 6d 65 6e 74 73 28 |ReadAssi|gnments(|
|00000590| 29 2e 0d 34 2f 35 2f 39 | 32 09 64 67 70 09 52 65 |)..4/5/9|2.dgp.Re|
|000005a0| 61 64 41 73 73 69 67 6e | 6d 65 6e 74 46 69 6c 65 |adAssign|mentFile|
|000005b0| 28 29 20 6e 6f 77 20 63 | 6c 6f 73 65 73 20 74 68 |() now c|loses th|
|000005c0| 65 20 66 69 6c 65 20 62 | 65 66 6f 72 65 20 72 65 |e file b|efore re|
|000005d0| 74 75 72 6e 69 6e 67 2e | 0d 34 2f 31 37 2f 39 32 |turning.|.4/17/92|
|000005e0| 09 64 67 70 09 45 78 70 | 61 6e 64 65 64 20 74 68 |.dgp.Exp|anded th|
|000005f0| 65 20 65 78 70 6c 61 6e | 61 74 69 6f 6e 20 6f 66 |e explan|ation of|
|00000600| 20 66 6c 61 67 73 2c 20 | 61 73 20 72 65 71 75 65 | flags, |as reque|
|00000610| 73 74 65 64 20 62 79 20 | 45 76 61 6e 20 52 65 6c |sted by |Evan Rel|
|00000620| 6b 69 6e 2e 0d 35 2f 31 | 34 2f 39 32 09 64 67 70 |kin..5/1|4/92.dgp|
|00000630| 09 45 78 70 61 6e 64 65 | 64 20 74 68 65 20 65 78 |.Expande|d the ex|
|00000640| 70 6c 61 6e 61 74 69 6f | 6e 20 6f 66 20 73 74 72 |planatio|n of str|
|00000650| 69 6e 67 54 79 70 65 2c | 20 22 22 2e 0d 38 2f 34 |ingType,| ""..8/4|
|00000660| 2f 39 32 09 64 67 70 09 | 41 64 64 65 64 20 50 72 |/92.dgp.|Added Pr|
|00000670| 69 6e 74 41 6e 41 73 73 | 69 67 6e 6d 65 6e 74 28 |intAnAss|ignment(|
|00000680| 29 2c 20 77 68 69 63 68 | 20 70 72 69 6e 74 73 20 |), which| prints |
|00000690| 6f 75 74 20 74 68 65 20 | 76 61 6c 75 65 20 6f 66 |out the |value of|
|000006a0| 20 61 20 76 61 72 69 61 | 62 6c 65 2c 0d 09 09 09 | a varia|ble,....|
|000006b0| 61 73 20 61 6e 20 61 73 | 73 69 67 6e 6d 65 6e 74 |as an as|signment|
|000006c0| 20 73 74 61 74 65 6d 65 | 6e 74 2c 20 73 75 69 74 | stateme|nt, suit|
|000006d0| 61 62 6c 65 20 66 6f 72 | 20 72 65 61 64 69 6e 67 |able for| reading|
|000006e0| 20 62 79 20 74 68 65 20 | 52 65 61 64 41 73 73 69 | by the |ReadAssi|
|000006f0| 67 6e 6d 65 6e 74 0d 09 | 09 09 72 6f 75 74 69 6e |gnment..|..routin|
|00000700| 65 73 2e 0d 31 30 2f 32 | 34 2f 39 32 20 64 67 70 |es..10/2|4/92 dgp|
|00000710| 20 45 6c 69 6d 69 6e 61 | 74 65 64 20 64 6f 75 62 | Elimina|ted doub|
|00000720| 6c 65 20 73 70 61 63 69 | 6e 67 20 74 68 61 74 20 |le spaci|ng that |
|00000730| 6f 63 63 75 72 72 65 64 | 20 61 66 74 65 72 20 2f |occurred| after /|
|00000740| 2f 2d 73 74 79 6c 65 20 | 63 6f 6d 6d 65 6e 74 20 |/-style |comment |
|00000750| 77 68 65 6e 20 0d 09 09 | 09 61 73 73 69 67 6e 45 |when ...|.assignE|
|00000760| 63 68 6f 43 6f 6d 6d 65 | 6e 74 20 77 61 73 20 72 |choComme|nt was r|
|00000770| 65 71 75 65 73 74 65 64 | 2e 0d 33 2f 34 2f 39 33 |equested|..3/4/93|
|00000780| 09 64 67 70 09 63 68 61 | 6e 67 65 64 20 74 68 65 |.dgp.cha|nged the|
|00000790| 20 64 65 66 69 6e 69 74 | 69 6f 6e 20 6f 66 20 65 | definit|ion of e|
|000007a0| 6d 70 74 79 53 74 72 69 | 6e 67 20 73 6c 69 67 68 |mptyStri|ng sligh|
|000007b0| 74 6c 79 20 73 6f 20 74 | 68 61 74 20 74 68 69 73 |tly so t|hat this|
|000007c0| 20 66 69 6c 65 20 63 6f | 75 6c 64 20 62 65 0d 09 | file co|uld be..|
|000007d0| 09 09 63 6f 6d 70 69 6c | 65 64 20 61 73 20 61 20 |..compil|ed as a |
|000007e0| 63 6f 64 65 20 72 65 73 | 6f 75 72 63 65 2e 0d 35 |code res|ource..5|
|000007f0| 2f 32 34 2f 39 33 09 64 | 67 70 09 41 73 73 69 67 |/24/93.d|gp.Assig|
|00000800| 6e 6d 65 6e 74 20 6c 69 | 6e 65 73 20 6d 61 79 20 |nment li|nes may |
|00000810| 6e 6f 77 20 62 65 20 63 | 6f 6e 74 69 6e 75 65 64 |now be c|ontinued|
|00000820| 20 62 79 20 70 75 74 74 | 69 6e 67 20 61 20 62 61 | by putt|ing a ba|
|00000830| 63 6b 73 6c 61 73 68 20 | 61 74 20 74 68 65 20 65 |ckslash |at the e|
|00000840| 6e 64 20 6f 66 0d 09 09 | 09 74 68 65 20 6c 69 6e |nd of...|.the lin|
|00000850| 65 2e 0d 09 09 09 53 74 | 72 69 6e 67 73 20 6d 61 |e.....St|rings ma|
|00000860| 79 20 69 6e 63 6c 75 64 | 65 20 6c 69 74 65 72 61 |y includ|e litera|
|00000870| 6c 20 6c 69 6e 65 66 65 | 65 64 73 2c 20 72 61 74 |l linefe|eds, rat|
|00000880| 68 65 72 20 74 68 61 6e | 20 6a 75 73 74 20 22 5c |her than| just "\|
|00000890| 6e 22 2e 0d 09 09 09 50 | 72 69 6e 74 65 64 20 73 |n".....P|rinted s|
|000008a0| 74 72 69 6e 67 20 61 73 | 73 69 67 6e 6d 65 6e 74 |tring as|signment|
|000008b0| 73 20 74 72 61 6e 73 6c | 61 74 65 20 6c 69 6e 65 |s transl|ate line|
|000008c0| 66 65 65 64 73 20 74 6f | 20 22 5c 6e 22 2e 0d 09 |feeds to| "\n"...|
|000008d0| 09 09 53 6b 69 70 20 75 | 6e 6b 6e 6f 77 6e 20 76 |..Skip u|nknown v|
|000008e0| 61 72 69 61 62 6c 65 73 | 20 75 6e 6c 65 73 73 20 |ariables| unless |
|000008f0| 66 6c 61 67 73 26 61 73 | 73 69 67 6e 52 65 70 6f |flags&as|signRepo|
|00000900| 72 74 55 6e 6b 6e 6f 77 | 6e 20 69 73 20 74 72 75 |rtUnknow|n is tru|
|00000910| 65 2e 0d 35 2f 32 37 2f | 39 33 09 64 67 70 09 41 |e..5/27/|93.dgp.A|
|00000920| 64 64 65 64 20 22 64 69 | 6d 22 20 66 69 65 6c 64 |dded "di|m" field|
|00000930| 20 74 6f 20 56 61 72 69 | 61 62 6c 65 20 73 74 72 | to Vari|able str|
|00000940| 75 63 74 75 72 65 2c 20 | 61 6e 64 20 61 64 64 65 |ucture, |and adde|
|00000950| 64 20 73 75 70 70 6f 72 | 74 20 66 6f 72 0d 09 09 |d suppor|t for...|
|00000960| 09 69 74 20 69 6e 20 61 | 6c 6c 20 74 68 65 20 72 |.it in a|ll the r|
|00000970| 6f 75 74 69 6e 65 73 2e | 0d 09 09 09 41 64 64 65 |outines.|....Adde|
|00000980| 64 20 66 6c 6f 61 74 54 | 79 70 65 2e 0d 09 09 09 |d floatT|ype.....|
|00000990| 49 6e 70 75 74 20 6c 69 | 6e 65 20 6c 65 6e 67 74 |Input li|ne lengt|
|000009a0| 68 20 69 73 20 73 74 69 | 6c 6c 20 6c 69 6d 69 74 |h is sti|ll limit|
|000009b0| 65 64 20 74 6f 20 42 55 | 46 46 45 52 5f 53 49 5a |ed to BU|FFER_SIZ|
|000009c0| 45 20 28 70 72 65 73 65 | 6e 74 6c 79 20 35 31 32 |E (prese|ntly 512|
|000009d0| 29 20 62 75 74 0d 09 09 | 09 73 74 72 69 6e 67 73 |) but...|.strings|
|000009e0| 20 28 62 72 6f 6b 65 6e | 20 75 70 20 69 6e 74 6f | (broken| up into|
|000009f0| 20 6c 69 6e 65 73 20 6f | 66 20 6c 65 67 61 6c 20 | lines o|f legal |
|00000a00| 6c 65 6e 67 74 68 20 61 | 6e 64 20 61 75 74 6f 6d |length a|nd autom|
|00000a10| 61 74 69 63 61 6c 6c 79 | 20 0d 09 09 09 63 6f 6e |atically| ....con|
|00000a20| 63 61 74 65 6e 61 74 65 | 64 20 64 75 72 69 6e 67 |catenate|d during|
|00000a30| 20 72 65 61 64 69 6e 67 | 29 20 63 61 6e 20 62 65 | reading|) can be|
|00000a40| 20 6f 66 20 61 6e 79 20 | 6c 65 6e 67 74 68 20 74 | of any |length t|
|00000a50| 68 61 74 20 77 69 6c 6c | 20 66 69 74 0d 09 09 09 |hat will| fit....|
|00000a60| 69 6e 20 6d 65 6d 6f 72 | 79 2e 0d 35 2f 32 38 2f |in memor|y..5/28/|
|00000a70| 39 33 09 64 67 70 09 41 | 64 64 65 64 20 73 75 70 |93.dgp.A|dded sup|
|00000a80| 70 6f 72 74 20 66 6f 72 | 20 68 65 78 2d 65 6e 63 |port for| hex-enc|
|00000a90| 6f 64 65 64 20 73 74 72 | 69 6e 67 73 2e 0d 09 09 |oded str|ings....|
|00000aa0| 09 43 72 65 61 74 65 64 | 20 6e 65 77 20 62 6f 74 |.Created| new bot|
|00000ab0| 74 6c 65 6e 65 63 6b 20 | 70 72 6f 63 65 64 75 72 |tleneck |procedur|
|00000ac0| 65 20 52 65 61 64 4c 69 | 6e 65 20 74 68 61 74 20 |e ReadLi|ne that |
|00000ad0| 64 6f 65 73 20 61 6c 6c | 20 74 68 65 20 72 65 61 |does all| the rea|
|00000ae0| 64 69 6e 67 2e 0d 35 2f | 33 31 2f 39 33 09 64 67 |ding..5/|31/93.dg|
|00000af0| 70 09 61 73 73 69 67 6e | 45 63 68 6f 41 73 73 69 |p.assign|EchoAssi|
|00000b00| 67 6e 6d 65 6e 74 73 20 | 6e 6f 77 20 63 61 6c 6c |gnments |now call|
|00000b10| 73 20 50 72 69 6e 74 41 | 6e 41 73 73 69 67 6e 6d |s PrintA|nAssignm|
|00000b20| 65 6e 74 2e 20 52 65 6d | 6f 76 65 64 20 22 5c 6e |ent. Rem|oved "\n|
|00000b30| 22 20 66 72 6f 6d 0d 09 | 09 09 50 72 69 6e 74 41 |" from..|..PrintA|
|00000b40| 6e 41 73 73 69 67 6e 6d | 65 6e 74 2e 20 4d 61 64 |nAssignm|ent. Mad|
|00000b50| 65 20 61 6c 6c 20 50 72 | 69 6e 74 20 72 6f 75 74 |e all Pr|int rout|
|00000b60| 69 6e 65 73 20 72 65 74 | 75 72 6e 20 61 73 73 69 |ines ret|urn assi|
|00000b70| 67 6e 6d 65 6e 74 20 63 | 6f 75 6e 74 2c 0d 09 09 |gnment c|ount,...|
|00000b80| 09 77 68 69 63 68 20 69 | 73 20 6e 6f 77 20 72 65 |.which i|s now re|
|00000b90| 64 65 66 69 6e 65 64 20 | 61 73 20 74 68 65 20 6e |defined |as the n|
|00000ba0| 75 6d 62 65 72 20 6f 66 | 20 61 72 72 61 79 20 65 |umber of| array e|
|00000bb0| 6c 65 6d 65 6e 74 73 20 | 6f 72 20 73 63 61 6c 61 |lements |or scala|
|00000bc0| 72 73 0d 09 09 09 74 68 | 61 74 20 77 65 72 65 20 |rs....th|at were |
|00000bd0| 61 73 73 69 67 6e 65 64 | 20 6f 72 20 70 72 69 6e |assigned| or prin|
|00000be0| 74 65 64 2e 20 4e 6f 77 | 20 70 61 72 73 65 20 6e |ted. Now| parse n|
|00000bf0| 61 6d 65 73 20 73 6f 20 | 74 68 61 74 0d 09 09 09 |ames so |that....|
|00000c00| 6b 6e 6f 77 6e 20 61 6e | 64 20 75 6e 6b 6e 6f 77 |known an|d unknow|
|00000c10| 6e 20 69 64 65 6e 74 69 | 66 69 65 72 73 20 61 72 |n identi|fiers ar|
|00000c20| 65 20 74 72 65 61 74 65 | 64 20 75 6e 69 66 6f 72 |e treate|d unifor|
|00000c30| 6d 6c 79 3b 20 74 68 65 | 73 65 20 6e 65 77 0d 09 |mly; the|se new..|
|00000c40| 09 09 6e 61 6d 69 6e 67 | 20 72 75 6c 65 73 20 61 |..naming| rules a|
|00000c50| 6c 6c 6f 77 20 6f 6e 6c | 79 20 73 69 6d 70 6c 65 |llow onl|y simple|
|00000c60| 20 43 20 69 64 65 6e 74 | 69 66 69 65 72 73 20 6a | C ident|ifiers j|
|00000c70| 6f 69 6e 65 64 20 62 79 | 20 22 2e 22 20 61 6e 64 |oined by| "." and|
|00000c80| 20 22 2d 3e 22 2e 0d 36 | 2f 31 2f 39 33 09 64 67 | "->"..6|/1/93.dg|
|00000c90| 70 09 69 6e 74 72 6f 64 | 75 63 65 64 20 61 73 73 |p.introd|uced ass|
|00000ca0| 69 67 6e 4e 6f 50 72 69 | 6e 74 66 45 78 69 74 20 |ignNoPri|ntfExit |
|00000cb0| 66 6c 61 67 20 74 68 61 | 74 20 63 61 75 73 65 73 |flag tha|t causes|
|00000cc0| 20 61 6c 6c 20 72 6f 75 | 74 69 6e 65 73 20 74 6f | all rou|tines to|
|00000cd0| 20 68 61 6e 64 6c 65 0d | 09 09 09 65 72 72 6f 72 | handle.|...error|
|00000ce0| 73 20 64 69 73 63 72 65 | 65 74 65 6c 79 2c 20 73 |s discre|etely, s|
|00000cf0| 69 6d 70 6c 79 20 72 65 | 74 75 72 6e 69 6e 67 20 |imply re|turning |
|00000d00| 61 6e 20 65 72 72 6f 72 | 20 6e 75 6d 62 65 72 20 |an error| number |
|00000d10| 74 6f 20 74 68 65 20 63 | 61 6c 6c 65 72 2e 0d 36 |to the c|aller..6|
|00000d20| 2f 32 2f 39 33 09 64 67 | 70 20 50 72 69 6e 74 41 |/2/93.dg|p PrintA|
|00000d30| 6e 41 73 73 69 67 6e 6d | 65 6e 74 20 6e 6f 77 20 |nAssignm|ent now |
|00000d40| 70 72 69 6e 74 73 20 6d | 75 6c 74 69 70 6c 65 20 |prints m|ultiple |
|00000d50| 61 73 73 69 67 6e 6d 65 | 6e 74 73 20 70 65 72 20 |assignme|nts per |
|00000d60| 38 30 20 63 68 61 72 61 | 63 74 65 72 20 6c 69 6e |80 chara|cter lin|
|00000d70| 65 2c 20 0d 09 09 09 61 | 64 64 69 6e 67 20 61 73 |e, ....a|dding as|
|00000d80| 20 6d 61 6e 79 20 63 6f | 6e 74 69 6e 75 61 74 69 | many co|ntinuati|
|00000d90| 6f 6e 20 6c 69 6e 65 73 | 20 61 73 20 6e 65 63 65 |on lines| as nece|
|00000da0| 73 73 61 72 79 2e 20 51 | 75 6f 74 65 64 20 73 74 |ssary. Q|uoted st|
|00000db0| 72 69 6e 67 73 20 28 61 | 6e 64 20 68 65 78 0d 09 |rings (a|nd hex..|
|00000dc0| 09 09 64 61 74 61 20 73 | 74 72 69 6e 67 73 29 20 |..data s|trings) |
|00000dd0| 61 72 65 20 6e 6f 77 20 | 62 72 6f 6b 65 6e 20 75 |are now |broken u|
|00000de0| 70 20 69 6e 74 6f 20 38 | 30 2d 63 68 61 72 61 63 |p into 8|0-charac|
|00000df0| 74 65 72 20 6c 69 6e 65 | 73 3b 20 63 6f 6e 74 69 |ter line|s; conti|
|00000e00| 6e 75 61 74 69 6f 6e 0d | 09 09 09 6c 69 6e 65 73 |nuation.|...lines|
|00000e10| 20 61 72 65 20 69 6e 64 | 65 6e 74 65 64 20 66 6f | are ind|ented fo|
|00000e20| 75 72 20 73 70 61 63 65 | 73 2e 20 41 64 64 65 64 |ur space|s. Added|
|00000e30| 20 63 6f 6d 6d 65 6e 74 | 20 66 69 65 6c 64 20 74 | comment| field t|
|00000e40| 6f 20 56 61 72 69 61 62 | 6c 65 20 73 74 72 75 63 |o Variab|le struc|
|00000e50| 74 75 72 65 0d 09 09 09 | 61 6e 64 20 61 64 64 65 |ture....|and adde|
|00000e60| 64 20 73 75 70 70 6f 72 | 74 20 66 6f 72 20 69 74 |d suppor|t for it|
|00000e70| 20 69 6e 20 50 72 69 6e | 74 41 6e 41 73 73 69 67 | in Prin|tAnAssig|
|00000e80| 6e 6d 65 6e 74 2e 20 52 | 65 6e 61 6d 65 64 20 61 |nment. R|enamed a|
|00000e90| 6c 6c 20 70 75 62 6c 69 | 73 68 65 64 0d 09 09 09 |ll publi|shed....|
|00000ea0| 65 6e 75 6d 20 76 61 6c | 75 65 73 20 74 6f 20 62 |enum val|ues to b|
|00000eb0| 65 67 69 6e 20 77 69 74 | 68 20 22 61 73 73 69 67 |egin wit|h "assig|
|00000ec0| 6e 22 2e 20 52 65 6e 61 | 6d 65 64 20 74 68 69 73 |n". Rena|med this|
|00000ed0| 20 66 69 6c 65 20 22 41 | 73 73 69 67 6e 2e 63 22 | file "A|ssign.c"|
|00000ee0| 2e 20 41 64 64 65 64 0d | 09 09 09 55 6e 65 71 75 |. Added.|...Unequ|
|00000ef0| 61 6c 56 61 72 69 61 62 | 6c 65 73 28 29 2e 20 43 |alVariab|les(). C|
|00000f00| 68 65 63 6b 41 56 61 72 | 69 61 62 6c 65 20 63 68 |heckAVar|iable ch|
|00000f10| 65 63 6b 73 20 74 68 61 | 74 20 76 61 72 69 61 62 |ecks tha|t variab|
|00000f20| 6c 65 20 6e 61 6d 65 20 | 69 73 20 6c 65 67 61 6c |le name |is legal|
|00000f30| 2e 0d 36 2f 35 2f 39 33 | 09 64 67 70 09 52 65 6d |..6/5/93|.dgp.Rem|
|00000f40| 6f 76 65 64 20 61 6c 6c | 20 4d 61 63 69 6e 74 6f |oved all| Macinto|
|00000f50| 73 68 20 64 65 70 65 6e | 64 65 6e 63 69 65 73 2c |sh depen|dencies,|
|00000f60| 20 6c 65 61 76 69 6e 67 | 20 70 75 72 65 20 53 74 | leaving| pure St|
|00000f70| 61 6e 64 61 72 64 20 43 | 20 70 6c 75 73 20 61 20 |andard C| plus a |
|00000f80| 66 65 77 0d 09 09 09 43 | 2b 2b 20 73 74 79 6c 65 |few....C|++ style|
|00000f90| 20 63 6f 6d 6d 65 6e 74 | 73 2e 0d 36 2f 31 36 2f | comment|s..6/16/|
|00000fa0| 39 33 09 64 67 70 09 52 | 65 6d 6f 76 65 64 20 70 |93.dgp.R|emoved p|
|00000fb0| 72 6f 68 69 62 69 74 69 | 6f 6e 3a 20 61 72 72 61 |rohibiti|on: arra|
|00000fc0| 79 73 20 6f 66 20 73 74 | 72 69 6e 67 54 79 70 65 |ys of st|ringType|
|00000fd0| 20 61 72 65 20 6e 6f 77 | 20 6f 6b 2e 0d 09 09 09 | are now| ok.....|
|00000fe0| 49 6e 69 74 69 61 6c 69 | 7a 65 41 56 61 72 69 61 |Initiali|zeAVaria|
|00000ff0| 62 6c 65 20 6e 6f 77 20 | 63 61 6c 6c 73 20 43 68 |ble now |calls Ch|
|00001000| 65 63 6b 41 56 61 72 69 | 61 62 6c 65 20 77 69 74 |eckAVari|able wit|
|00001010| 68 20 22 66 6c 61 67 73 | 22 20 75 6e 6d 6f 64 69 |h "flags|" unmodi|
|00001020| 66 69 65 64 2e 0d 09 09 | 09 43 68 65 63 6b 41 56 |fied....|.CheckAV|
|00001030| 61 72 69 61 62 6c 65 20 | 6e 6f 77 20 63 68 65 63 |ariable |now chec|
|00001040| 6b 73 20 66 6f 72 20 61 | 6e 79 20 69 6c 6c 65 67 |ks for a|ny illeg|
|00001050| 61 6c 20 73 75 66 66 69 | 78 20 69 6e 20 6e 61 6d |al suffi|x in nam|
|00001060| 65 2e 0d 09 09 09 55 6e | 6b 6e 6f 77 6e 20 73 75 |e.....Un|known su|
|00001070| 62 73 63 72 69 70 74 65 | 64 20 76 61 72 69 61 62 |bscripte|d variab|
|00001080| 6c 65 73 20 61 72 65 20 | 6e 6f 77 20 63 6f 72 72 |les are |now corr|
|00001090| 65 63 74 6c 79 20 72 65 | 70 6f 72 74 65 64 20 61 |ectly re|ported a|
|000010a0| 73 20 22 55 4e 4b 4e 4f | 57 4e 22 20 0d 09 09 09 |s "UNKNO|WN" ....|
|000010b0| 72 61 74 68 65 72 20 74 | 68 61 6e 20 22 4f 55 54 |rather t|han "OUT|
|000010c0| 20 4f 46 20 42 4f 55 4e | 44 53 22 2e 0d 36 2f 32 | OF BOUN|DS"..6/2|
|000010d0| 39 2f 39 33 09 64 67 70 | 09 61 64 64 65 64 20 73 |9/93.dgp|.added s|
|000010e0| 68 6f 72 74 44 6f 75 62 | 6c 65 54 79 70 65 2e 0d |hortDoub|leType..|
|000010f0| 37 2f 31 30 2f 39 33 09 | 64 67 70 09 72 65 73 74 |7/10/93.|dgp.rest|
|00001100| 6f 72 65 64 20 53 74 61 | 6e 64 61 72 64 20 43 20 |ored Sta|ndard C |
|00001110| 63 6f 6d 70 61 74 69 62 | 69 6c 69 74 79 20 62 79 |compatib|ility by|
|00001120| 20 75 73 69 6e 67 20 22 | 73 68 6f 72 74 20 64 6f | using "|short do|
|00001130| 75 62 6c 65 22 20 6f 6e | 6c 79 20 69 66 0d 09 09 |uble" on|ly if...|
|00001140| 09 53 48 4f 52 54 5f 44 | 4f 55 42 4c 45 5f 4f 4b |.SHORT_D|OUBLE_OK|
|00001150| 2c 20 73 69 6e 63 65 20 | 53 74 61 6e 64 61 72 64 |, since |Standard|
|00001160| 20 43 20 64 6f 65 73 6e | 27 74 20 61 6c 6c 6f 77 | C doesn|'t allow|
|00001170| 20 74 68 61 74 20 74 79 | 70 65 2e 0d 37 2f 31 39 | that ty|pe..7/19|
|00001180| 2f 39 33 09 64 67 70 09 | 6e 6f 74 65 64 20 74 68 |/93.dgp.|noted th|
|00001190| 61 74 20 61 73 73 69 67 | 6e 20 66 69 6c 65 20 73 |at assig|n file s|
|000011a0| 68 6f 75 6c 64 20 62 65 | 20 6f 70 65 6e 65 64 20 |hould be| opened |
|000011b0| 69 6e 20 74 65 78 74 20 | 6d 6f 64 65 2c 20 6e 6f |in text |mode, no|
|000011c0| 74 20 62 69 6e 61 72 79 | 20 6d 6f 64 65 2c 20 73 |t binary| mode, s|
|000011d0| 6f 20 74 68 61 74 0d 09 | 09 09 5c 72 20 63 68 61 |o that..|..\r cha|
|000011e0| 72 61 63 74 65 72 73 20 | 77 69 6c 6c 20 62 65 20 |racters |will be |
|000011f0| 74 72 61 6e 73 6c 61 74 | 65 64 20 70 72 6f 70 65 |translat|ed prope|
|00001200| 72 6c 79 2e 0d 37 2f 32 | 39 2f 39 33 09 64 68 62 |rly..7/2|9/93.dhb|
|00001210| 20 26 20 64 67 70 20 46 | 6f 75 6e 64 20 61 6e 64 | & dgp F|ound and|
|00001220| 20 66 69 78 65 64 20 74 | 68 65 20 6e 65 77 6c 69 | fixed t|he newli|
|00001230| 6e 65 20 70 72 6f 62 6c | 65 6d 20 74 68 61 74 20 |ne probl|em that |
|00001240| 61 70 70 65 61 72 73 20 | 69 6e 20 74 68 65 20 4d |appears |in the M|
|00001250| 41 54 4c 41 42 0d 09 09 | 09 65 6e 76 69 72 6f 6e |ATLAB...|.environ|
|00001260| 6d 65 6e 74 2c 20 61 73 | 20 64 6f 63 75 6d 65 6e |ment, as| documen|
|00001270| 74 65 64 20 69 6e 20 41 | 73 73 69 67 6e 2e 6e 6f |ted in A|ssign.no|
|00001280| 74 65 2e 0d 37 2f 33 31 | 2f 39 33 09 64 67 70 09 |te..7/31|/93.dgp.|
|00001290| 41 64 64 65 64 20 73 75 | 70 70 6f 72 74 20 66 6f |Added su|pport fo|
|000012a0| 72 20 6d 75 6c 74 69 64 | 69 6d 65 6e 73 69 6f 6e |r multid|imension|
|000012b0| 61 6c 20 61 72 72 61 79 | 73 2c 20 77 69 74 68 20 |al array|s, with |
|000012c0| 75 70 20 74 6f 20 41 53 | 53 49 47 4e 5f 44 49 4d |up to AS|SIGN_DIM|
|000012d0| 53 0d 09 09 09 64 69 6d | 65 6e 73 69 6f 6e 73 2e |S....dim|ensions.|
|000012e0| 20 41 64 64 65 64 20 53 | 65 74 56 61 72 69 61 62 | Added S|etVariab|
|000012f0| 6c 65 41 72 72 61 79 28 | 29 2c 20 63 68 61 6e 67 |leArray(|), chang|
|00001300| 65 64 20 53 65 74 56 61 | 72 69 61 62 6c 65 28 29 |ed SetVa|riable()|
|00001310| 20 61 6e 64 0d 09 09 09 | 53 65 74 56 61 72 69 61 | and....|SetVaria|
|00001320| 62 6c 65 46 69 72 73 74 | 4c 61 73 74 28 29 2c 20 |bleFirst|Last(), |
|00001330| 61 6e 64 20 64 65 6c 65 | 74 65 64 20 53 65 74 41 |and dele|ted SetA|
|00001340| 56 61 72 69 61 62 6c 65 | 46 69 72 73 74 4c 61 73 |Variable|FirstLas|
|00001350| 74 28 29 2e 0d 38 2f 32 | 2f 39 33 09 64 67 70 09 |t()..8/2|/93.dgp.|
|00001360| 41 64 64 65 64 20 64 79 | 6e 61 6d 69 63 20 61 6c |Added dy|namic al|
|00001370| 6c 6f 63 61 74 69 6f 6e | 20 6f 66 20 70 74 72 54 |location| of ptrT|
|00001380| 79 70 65 20 61 72 72 61 | 79 73 2c 20 62 61 73 65 |ype arra|ys, base|
|00001390| 64 20 6f 6e 20 73 63 61 | 6e 6e 69 6e 67 20 74 68 |d on sca|nning th|
|000013a0| 65 20 63 75 72 72 65 6e | 74 0d 09 09 09 67 75 6c |e curren|t....gul|
|000013b0| 70 20 6f 66 20 74 68 65 | 20 61 73 73 69 67 6e 20 |p of the| assign |
|000013c0| 66 69 6c 65 2e 0d 38 2f | 31 32 2f 39 33 09 64 67 |file..8/|12/93.dg|
|000013d0| 70 09 52 65 6e 61 6d 65 | 64 20 22 56 61 72 69 61 |p.Rename|d "Varia|
|000013e0| 62 6c 65 22 20 74 6f 20 | 22 44 65 73 63 72 69 70 |ble" to |"Descrip|
|000013f0| 74 69 6f 6e 22 2e 20 52 | 65 6e 61 6d 65 64 20 6d |tion". R|enamed m|
|00001400| 6f 73 74 20 6f 66 20 74 | 68 65 20 72 6f 75 74 69 |ost of t|he routi|
|00001410| 6e 65 73 2e 20 0d 09 09 | 09 54 68 65 20 68 65 61 |nes. ...|.The hea|
|00001420| 64 65 72 20 66 69 6c 65 | 20 41 73 73 69 67 6e 39 |der file| Assign9|
|00001430| 32 2e 68 20 70 72 6f 76 | 69 64 65 73 20 66 6f 72 |2.h prov|ides for|
|00001440| 20 62 61 63 6b 77 61 72 | 64 20 63 6f 6d 70 61 74 | backwar|d compat|
|00001450| 69 62 69 6c 69 74 79 2e | 0d 38 2f 32 31 2f 39 33 |ibility.|.8/21/93|
|00001460| 09 64 68 62 2c 64 67 70 | 09 46 6f 72 20 63 6f 6d |.dhb,dgp|.For com|
|00001470| 70 61 74 69 62 69 6c 69 | 74 79 20 77 69 74 68 20 |patibili|ty with |
|00001480| 4d 41 54 4c 41 42 20 77 | 65 20 61 76 6f 69 64 20 |MATLAB w|e avoid |
|00001490| 75 73 69 6e 67 20 69 6e | 74 20 61 72 67 75 6d 65 |using in|t argume|
|000014a0| 6e 74 73 20 69 6e 20 73 | 74 64 69 6f 20 0d 09 09 |nts in s|tdio ...|
|000014b0| 09 63 61 6c 6c 73 20 62 | 65 63 61 75 73 65 20 77 |.calls b|ecause w|
|000014c0| 68 65 6e 20 4d 41 54 4c | 41 42 20 69 73 20 74 72 |hen MATL|AB is tr|
|000014d0| 75 65 20 77 65 27 6c 6c | 20 62 65 20 75 73 69 6e |ue we'll| be usin|
|000014e0| 67 20 4d 50 57 27 73 20 | 73 74 64 69 6f 0d 09 09 |g MPW's |stdio...|
|000014f0| 09 6c 69 62 72 61 72 79 | 2c 20 61 6e 64 20 69 74 |.library|, and it|
|00001500| 73 20 69 6e 74 20 69 73 | 20 34 20 62 79 74 65 73 |s int is| 4 bytes|
|00001510| 20 77 68 65 72 65 61 73 | 20 74 68 65 20 54 48 49 | whereas| the THI|
|00001520| 4e 4b 20 43 20 69 6e 74 | 20 69 73 20 32 20 62 79 |NK C int| is 2 by|
|00001530| 74 65 73 2e 0d 09 09 64 | 68 62 2c 6a 6d 73 09 43 |tes....d|hb,jms.C|
|00001540| 68 61 6e 67 65 64 20 22 | 77 61 22 20 69 6e 20 66 |hanged "|wa" in f|
|00001550| 6f 70 65 6e 20 69 6e 20 | 50 72 69 6e 74 41 73 73 |open in |PrintAss|
|00001560| 69 67 6e 6d 65 6e 74 73 | 54 6f 46 69 6c 65 20 74 |ignments|ToFile t|
|00001570| 6f 20 22 61 22 2e 0d 09 | 09 64 68 62 2c 6a 6d 73 |o "a"...|.dhb,jms|
|00001580| 2c 64 67 70 20 4d 6f 76 | 65 64 20 74 68 65 20 4e |,dgp Mov|ed the N|
|00001590| 4c 20 61 6e 64 20 4e 45 | 57 4c 49 4e 45 20 6d 61 |L and NE|WLINE ma|
|000015a0| 63 72 6f 73 20 69 6e 74 | 6f 20 56 69 64 65 6f 54 |cros int|o VideoT|
|000015b0| 6f 6f 6c 62 6f 78 2e 68 | 2e 0d 39 2f 32 2f 39 33 |oolbox.h|..9/2/93|
|000015c0| 09 64 67 70 09 45 78 70 | 61 6e 64 65 64 20 64 6f |.dgp.Exp|anded do|
|000015d0| 63 75 6d 65 6e 74 61 74 | 69 6f 6e 20 6f 66 20 46 |cumentat|ion of F|
|000015e0| 72 65 65 50 74 72 56 61 | 72 69 61 62 6c 65 73 2e |reePtrVa|riables.|
|000015f0| 20 46 69 78 65 64 20 6d | 69 6e 6f 72 20 62 75 67 | Fixed m|inor bug|
|00001600| 73 0d 09 09 09 69 6e 20 | 50 72 69 6e 74 41 56 61 |s....in |PrintAVa|
|00001610| 72 69 61 62 6c 65 20 66 | 6f 72 20 68 65 78 20 65 |riable f|or hex e|
|00001620| 6e 63 6f 64 65 64 20 50 | 74 72 20 76 61 72 69 61 |ncoded P|tr varia|
|00001630| 62 6c 65 73 20 73 6f 20 | 74 68 61 74 20 64 69 6d |bles so |that dim|
|00001640| 65 6e 73 69 6f 6e 61 6c | 69 74 79 0d 09 09 09 6f |ensional|ity....o|
|00001650| 66 20 77 68 61 74 20 77 | 61 73 20 77 72 69 74 74 |f what w|as writt|
|00001660| 65 6e 20 69 73 20 72 65 | 63 6f 76 65 72 65 64 20 |en is re|covered |
|00001670| 77 68 65 6e 20 69 74 27 | 73 20 72 65 61 64 2e 0d |when it'|s read..|
|00001680| 39 2f 37 2f 39 33 09 64 | 67 70 09 49 6e 74 72 6f |9/7/93.d|gp.Intro|
|00001690| 64 75 63 65 64 20 53 54 | 44 49 4f 5f 49 4e 54 2e |duced ST|DIO_INT.|
|000016a0| 0d 39 2f 37 2f 39 33 09 | 64 68 62 2c 6a 6d 73 2c |.9/7/93.|dhb,jms,|
|000016b0| 64 67 70 09 41 64 64 65 | 64 20 4f 70 65 6e 43 61 |dgp.Adde|d OpenCa|
|000016c0| 6c 46 69 6c 65 57 72 69 | 74 65 2c 20 4f 70 65 6e |lFileWri|te, Open|
|000016d0| 43 61 6c 46 69 6c 65 52 | 65 61 64 2c 20 4f 70 65 |CalFileR|ead, Ope|
|000016e0| 6e 43 61 6c 46 69 6c 65 | 52 65 61 64 41 6e 64 43 |nCalFile|ReadAndC|
|000016f0| 68 65 63 6b 2c 0d 09 09 | 09 41 70 70 65 6e 64 44 |heck,...|.AppendD|
|00001700| 65 73 63 72 69 70 74 69 | 6f 6e 73 2c 20 43 6f 70 |escripti|ons, Cop|
|00001710| 79 44 65 73 63 72 69 70 | 74 69 6f 6e 73 2c 20 41 |yDescrip|tions, A|
|00001720| 6c 6c 6f 63 61 74 65 44 | 65 73 63 72 69 70 74 69 |llocateD|escripti|
|00001730| 6f 6e 73 2c 0d 09 09 09 | 46 72 65 65 44 65 73 63 |ons,....|FreeDesc|
|00001740| 72 69 70 74 69 6f 6e 73 | 2c 20 4e 75 6d 62 65 72 |riptions|, Number|
|00001750| 4f 66 44 65 73 63 72 69 | 70 74 69 6f 6e 73 2c 20 |OfDescri|ptions, |
|00001760| 4e 75 6c 6c 44 65 73 63 | 72 69 70 74 69 6f 6e 2c |NullDesc|ription,|
|00001770| 20 61 6e 64 20 0d 09 09 | 09 49 73 4e 75 6c 6c 44 | and ...|.IsNullD|
|00001780| 65 73 63 72 69 70 74 69 | 6f 6e 2e 0d 39 2f 39 2f |escripti|on..9/9/|
|00001790| 39 33 09 64 68 62 09 41 | 64 64 65 64 20 52 65 61 |93.dhb.A|dded Rea|
|000017a0| 64 41 73 73 69 67 6e 6d | 65 6e 74 53 74 72 65 61 |dAssignm|entStrea|
|000017b0| 6d 2c 20 74 6f 20 72 65 | 61 64 20 74 68 65 20 72 |m, to re|ad the r|
|000017c0| 65 73 74 20 6f 66 20 61 | 20 66 69 6c 65 20 73 74 |est of a| file st|
|000017d0| 72 65 61 6d 20 61 73 20 | 61 20 73 69 6e 67 6c 65 |ream as |a single|
|000017e0| 0d 09 09 09 67 75 6c 70 | 2e 0d 39 2f 31 31 2f 39 |....gulp|..9/11/9|
|000017f0| 33 09 64 67 70 09 72 65 | 77 72 6f 74 65 20 52 65 |3.dgp.re|wrote Re|
|00001800| 61 64 41 73 73 69 67 6e | 6d 65 6e 74 46 69 6c 65 |adAssign|mentFile|
|00001810| 20 74 6f 20 6a 75 73 74 | 20 6f 70 65 6e 20 74 68 | to just| open th|
|00001820| 65 20 66 69 6c 65 20 61 | 6e 64 20 63 61 6c 6c 20 |e file a|nd call |
|00001830| 0d 09 09 09 52 65 61 64 | 41 73 73 69 67 6e 6d 65 |....Read|Assignme|
|00001840| 6e 74 53 74 72 65 61 6d | 2e 0d 39 2f 31 32 2f 39 |ntStream|..9/12/9|
|00001850| 33 09 64 68 62 09 43 68 | 61 6e 67 65 64 20 53 54 |3.dhb.Ch|anged ST|
|00001860| 44 49 4f 5f 49 4e 54 20 | 74 6f 20 50 52 49 4e 54 |DIO_INT |to PRINT|
|00001870| 46 5f 49 4e 54 2c 20 61 | 64 64 65 64 20 69 6e 63 |F_INT, a|dded inc|
|00001880| 6c 75 73 69 6f 6e 20 6f | 66 20 56 69 64 65 6f 54 |lusion o|f VideoT|
|00001890| 6f 6f 6c 62 6f 78 0d 20 | 20 20 20 20 20 20 20 20 |oolbox. | |
|000018a0| 20 20 20 77 68 65 6e 20 | 4d 41 54 4c 41 42 20 69 | when |MATLAB i|
|000018b0| 73 20 6f 6e 2e 0d 39 2f | 31 35 2f 39 33 09 64 67 |s on..9/|15/93.dg|
|000018c0| 70 09 4d 6f 76 65 64 20 | 64 6f 63 75 6d 65 6e 74 |p.Moved |document|
|000018d0| 61 74 69 6f 6e 20 74 6f | 20 41 73 73 69 67 6e 2e |ation to| Assign.|
|000018e0| 6e 6f 74 65 2e 0d 39 2f | 31 36 2f 39 33 09 64 67 |note..9/|16/93.dg|
|000018f0| 70 09 4d 65 72 67 65 64 | 20 41 73 73 69 67 6e 2e |p.Merged| Assign.|
|00001900| 68 20 69 6e 74 6f 20 56 | 69 64 65 6f 54 6f 6f 6c |h into V|ideoTool|
|00001910| 62 6f 78 2e 68 2e 0d 33 | 2f 34 2f 39 34 09 64 67 |box.h..3|/4/94.dg|
|00001920| 70 09 49 6e 63 72 65 61 | 73 65 64 20 6e 75 6d 62 |p.Increa|sed numb|
|00001930| 65 72 20 6f 66 20 66 6c | 6f 61 74 20 61 6e 64 20 |er of fl|oat and |
|00001940| 64 6f 75 62 6c 65 20 64 | 69 67 69 74 73 20 70 72 |double d|igits pr|
|00001950| 6f 64 75 63 65 64 20 62 | 79 20 50 72 69 6e 74 41 |oduced b|y PrintA|
|00001960| 6e 41 73 73 69 67 6e 6d | 65 6e 74 20 0d 09 09 09 |nAssignm|ent ....|
|00001970| 75 70 20 74 6f 20 74 68 | 61 74 20 73 70 65 63 69 |up to th|at speci|
|00001980| 66 69 65 64 20 69 6e 20 | 66 6c 6f 61 74 2e 68 2e |fied in |float.h.|
|00001990| 20 54 68 69 73 20 73 68 | 6f 75 6c 64 20 65 6c 69 | This sh|ould eli|
|000019a0| 6d 69 6e 61 74 65 20 73 | 70 75 72 69 6f 75 73 20 |minate s|purious |
|000019b0| 66 61 69 6c 75 72 65 0d | 09 09 09 6f 66 20 74 68 |failure.|...of th|
|000019c0| 65 20 72 65 61 64 2d 62 | 61 63 6b 20 63 68 65 63 |e read-b|ack chec|
|000019d0| 6b 73 2e 0d 09 09 09 45 | 6e 68 61 6e 63 65 64 20 |ks.....E|nhanced |
|000019e0| 50 72 69 6e 74 51 75 6f | 74 65 64 53 74 72 69 6e |PrintQuo|tedStrin|
|000019f0| 67 20 74 6f 20 63 6f 72 | 72 65 63 74 6c 79 20 68 |g to cor|rectly h|
|00001a00| 61 6e 64 6c 65 20 73 74 | 72 69 6e 67 73 20 63 6f |andle st|rings co|
|00001a10| 6e 74 61 69 6e 69 6e 67 | 20 74 68 65 20 64 6f 75 |ntaining| the dou|
|00001a20| 62 6c 65 0d 09 09 09 71 | 75 6f 74 65 20 63 68 61 |ble....q|uote cha|
|00001a30| 72 61 63 74 65 72 2e 0d | 33 2f 32 38 2f 39 34 09 |racter..|3/28/94.|
|00001a40| 64 67 70 20 49 6e 73 65 | 72 74 65 64 20 73 70 61 |dgp Inse|rted spa|
|00001a50| 63 65 20 62 65 66 6f 72 | 65 20 63 6f 6d 6d 65 6e |ce befor|e commen|
|00001a60| 74 73 20 28 69 2e 65 2e | 20 62 65 66 6f 72 65 20 |ts (i.e.| before |
|00001a70| 22 2f 2a 22 29 20 61 6e | 64 20 6e 6f 77 20 70 61 |"/*") an|d now pa|
|00001a80| 64 20 74 68 65 20 69 6e | 73 69 64 65 0d 09 09 09 |d the in|side....|
|00001a90| 6f 66 20 74 68 65 20 63 | 6f 6d 6d 65 6e 74 20 64 |of the c|omment d|
|00001aa0| 65 6c 69 6d 69 74 65 72 | 73 20 77 69 74 68 20 6f |elimiter|s with o|
|00001ab0| 70 74 69 6f 6e 2d 73 70 | 61 63 65 20 69 6e 73 74 |ption-sp|ace inst|
|00001ac0| 65 61 64 20 6f 66 20 73 | 70 61 63 65 20 66 6f 72 |ead of s|pace for|
|00001ad0| 20 6d 6f 72 65 20 0d 09 | 09 09 70 6c 65 61 73 69 | more ..|..pleasi|
|00001ae0| 6e 67 20 77 6f 72 64 20 | 77 72 61 70 70 69 6e 67 |ng word |wrapping|
|00001af0| 20 77 68 65 6e 20 74 68 | 65 20 61 73 73 69 67 6e | when th|e assign|
|00001b00| 6d 65 6e 74 20 66 69 6c | 65 20 69 73 20 76 69 65 |ment fil|e is vie|
|00001b10| 77 65 64 20 69 6e 20 74 | 68 61 74 20 77 61 79 2e |wed in t|hat way.|
|00001b20| 0d 36 2f 31 36 2f 39 34 | 09 64 67 70 09 45 6e 68 |.6/16/94|.dgp.Enh|
|00001b30| 61 6e 63 65 64 20 50 61 | 72 73 69 6e 67 45 72 72 |anced Pa|rsingErr|
|00001b40| 6f 72 20 74 6f 20 75 73 | 65 20 50 72 69 6e 74 51 |or to us|e PrintQ|
|00001b50| 75 6f 74 65 64 53 74 72 | 69 6e 67 20 74 6f 20 70 |uotedStr|ing to p|
|00001b60| 72 69 6e 74 20 74 68 65 | 20 6f 66 66 65 6e 64 69 |rint the| offendi|
|00001b70| 6e 67 20 74 65 78 74 0d | 09 09 09 73 6f 20 74 68 |ng text.|...so th|
|00001b80| 61 74 20 61 6e 79 20 73 | 70 75 72 69 6f 75 73 20 |at any s|purious |
|00001b90| 6e 6f 6e 70 72 69 6e 74 | 69 6e 67 20 63 68 61 72 |nonprint|ing char|
|00001ba0| 61 63 74 65 72 73 20 77 | 69 6c 6c 20 62 65 20 72 |acters w|ill be r|
|00001bb0| 65 76 65 61 6c 65 64 2e | 0d 09 09 09 50 61 72 73 |evealed.|....Pars|
|00001bc0| 69 6e 67 45 72 72 6f 72 | 20 6e 6f 77 20 73 75 70 |ingError| now sup|
|00001bd0| 70 72 65 73 73 65 73 20 | 22 5c 6e 22 20 61 74 20 |presses |"\n" at |
|00001be0| 65 6e 64 20 6f 66 20 6f | 66 66 65 6e 64 69 6e 67 |end of o|ffending|
|00001bf0| 20 73 74 72 69 6e 67 2e | 0d 09 09 09 45 6e 68 61 | string.|....Enha|
|00001c00| 6e 63 65 64 20 50 72 69 | 6e 74 51 75 6f 74 65 64 |nced Pri|ntQuoted|
|00001c10| 53 74 72 69 6e 67 20 74 | 6f 20 61 63 63 65 70 74 |String t|o accept|
|00001c20| 20 61 72 62 69 74 72 61 | 72 79 20 6f 70 65 6e 20 | arbitra|ry open |
|00001c30| 61 6e 64 20 63 6c 6f 73 | 65 20 73 74 72 69 6e 67 |and clos|e string|
|00001c40| 73 2c 20 0d 09 09 09 74 | 79 70 69 63 61 6c 6c 79 |s, ....t|ypically|
|00001c50| 20 6a 75 73 74 20 74 68 | 65 20 74 72 61 64 69 74 | just th|e tradit|
|00001c60| 69 6f 6e 61 6c 20 64 6f | 75 62 6c 65 2d 71 75 6f |ional do|uble-quo|
|00001c70| 74 65 20 63 68 61 72 61 | 63 74 65 72 2e 0d 36 2f |te chara|cter..6/|
|00001c80| 31 37 2f 39 34 09 64 67 | 70 09 4d 6f 64 69 66 69 |17/94.dg|p.Modifi|
|00001c90| 65 64 20 50 72 69 6e 74 | 51 75 6f 74 65 64 53 74 |ed Print|QuotedSt|
|00001ca0| 72 69 6e 67 20 74 6f 20 | 70 72 69 6e 74 20 6f 70 |ring to |print op|
|00001cb0| 74 69 6f 6e 2d 73 70 61 | 63 65 20 22 5c 33 31 32 |tion-spa|ce "\312|
|00001cc0| 22 20 64 69 72 65 63 74 | 6c 79 2c 20 73 6f 0d 09 |" direct|ly, so..|
|00001cd0| 09 09 74 68 61 74 20 74 | 68 65 20 70 72 69 6e 74 |..that t|he print|
|00001ce0| 6f 75 74 20 77 69 6c 6c | 20 62 65 20 72 65 61 64 |out will| be read|
|00001cf0| 61 62 6c 65 2e 0d 37 2f | 36 2f 39 34 09 64 67 70 |able..7/|6/94.dgp|
|00001d00| 09 52 65 70 6c 61 63 65 | 64 20 6d 61 78 69 6d 75 |.Replace|d maximu|
|00001d10| 6d 20 6c 69 6e 65 6c 65 | 6e 67 74 68 20 6f 66 20 |m linele|ngth of |
|00001d20| 38 30 20 62 79 20 61 20 | 63 6f 6d 70 69 6c 65 2d |80 by a |compile-|
|00001d30| 74 69 6d 65 20 63 6f 6e | 73 74 61 6e 74 20 6f 66 |time con|stant of|
|00001d40| 20 37 36 2c 20 73 6f 0d | 09 09 09 74 68 61 74 20 | 76, so.|...that |
|00001d50| 61 73 73 69 67 6e 6d 65 | 6e 74 20 66 69 6c 65 73 |assignme|nt files|
|00001d60| 20 63 61 6e 20 62 65 20 | 65 6d 61 69 6c 65 64 2e | can be |emailed.|
|00001d70| 0d 37 2f 37 2f 39 34 09 | 64 67 70 09 41 64 64 65 |.7/7/94.|dgp.Adde|
|00001d80| 64 20 43 6f 70 79 44 65 | 73 63 72 69 62 65 64 56 |d CopyDe|scribedV|
|00001d90| 61 72 73 2e 0d 37 2f 31 | 31 2f 39 34 20 64 67 70 |ars..7/1|1/94 dgp|
|00001da0| 20 46 69 78 65 64 20 62 | 75 67 20 69 6e 20 52 65 | Fixed b|ug in Re|
|00001db0| 61 64 41 73 73 69 67 6e | 6d 65 6e 74 53 74 72 65 |adAssign|mentStre|
|00001dc0| 61 6d 20 61 6e 64 20 52 | 65 61 64 41 73 73 69 67 |am and R|eadAssig|
|00001dd0| 6e 6d 65 6e 74 4c 69 6e | 65 20 74 68 61 74 20 67 |nmentLin|e that g|
|00001de0| 61 72 62 6c 65 64 20 74 | 68 65 0d 09 09 09 72 65 |arbled t|he....re|
|00001df0| 74 75 72 6e 65 64 20 65 | 72 72 6f 72 20 76 61 6c |turned e|rror val|
|00001e00| 75 65 2c 20 69 66 20 74 | 68 65 72 65 20 77 61 73 |ue, if t|here was|
|00001e10| 20 61 6e 20 65 72 72 6f | 72 2c 20 62 79 20 61 64 | an erro|r, by ad|
|00001e20| 64 69 6e 67 20 74 6f 20 | 69 74 20 74 68 65 20 6e |ding to |it the n|
|00001e30| 75 6d 62 65 72 20 6f 66 | 0d 09 09 09 6c 69 6e 65 |umber of|....line|
|00001e40| 73 20 72 65 61 64 2e 0d | 37 2f 31 36 2f 39 34 20 |s read..|7/16/94 |
|00001e50| 64 67 70 20 46 6f 75 6e | 64 20 61 6e 64 20 66 69 |dgp Foun|d and fi|
|00001e60| 78 65 64 20 61 20 6d 65 | 6d 6f 72 79 20 6c 65 61 |xed a me|mory lea|
|00001e70| 6b 20 69 6e 20 52 65 61 | 64 41 73 73 69 67 6e 6d |k in Rea|dAssignm|
|00001e80| 65 6e 74 4c 69 6e 65 2e | 20 47 65 74 4e 61 6d 65 |entLine.| GetName|
|00001e90| 28 29 20 63 61 6c 6c 65 | 64 0d 09 09 09 6d 61 6c |() calle|d....mal|
|00001ea0| 6c 6f 63 20 66 6f 72 20 | 64 53 63 72 61 74 63 68 |loc for |dScratch|
|00001eb0| 2d 3e 6e 61 6d 65 2c 20 | 77 68 69 63 68 20 77 61 |->name, |which wa|
|00001ec0| 73 6e 27 74 20 62 65 69 | 6e 67 20 66 72 65 65 64 |sn't bei|ng freed|
|00001ed0| 2e 20 54 68 69 73 20 63 | 6f 73 74 20 61 62 6f 75 |. This c|ost abou|
|00001ee0| 74 0d 09 09 09 34 30 20 | 62 79 74 65 73 20 66 6f |t....40 |bytes fo|
|00001ef0| 72 20 65 76 65 72 79 20 | 76 61 72 69 61 62 6c 65 |r every |variable|
|00001f00| 2e 20 49 20 66 69 78 65 | 64 20 74 68 61 74 2e 20 |. I fixe|d that. |
|00001f10| 54 68 65 72 65 20 73 74 | 69 6c 6c 20 73 65 65 6d |There st|ill seem|
|00001f20| 73 20 74 6f 20 62 65 20 | 61 0d 09 09 09 6d 75 63 |s to be |a....muc|
|00001f30| 68 20 73 6d 61 6c 6c 65 | 72 20 6d 65 6d 6f 72 79 |h smalle|r memory|
|00001f40| 20 6c 65 61 6b 2c 20 77 | 68 69 63 68 20 49 20 63 | leak, w|hich I c|
|00001f50| 6f 75 6c 64 6e 27 74 20 | 71 75 69 63 6b 6c 79 20 |ouldn't |quickly |
|00001f60| 6c 6f 63 61 74 65 2c 20 | 61 6e 64 20 77 68 69 63 |locate, |and whic|
|00001f70| 68 0d 09 09 09 49 20 63 | 61 6e 20 6c 69 76 65 20 |h....I c|an live |
|00001f80| 77 69 74 68 20 66 6f 72 | 20 74 68 65 20 74 69 6d |with for| the tim|
|00001f90| 65 20 62 65 69 6e 67 2e | 0d 39 2f 35 2f 39 34 09 |e being.|.9/5/94.|
|00001fa0| 64 67 70 09 61 64 64 65 | 64 20 73 75 70 70 6f 72 |dgp.adde|d suppor|
|00001fb0| 74 20 66 6f 72 20 72 65 | 61 64 69 6e 67 20 6f 66 |t for re|ading of|
|00001fc0| 20 4d 65 74 72 6f 77 65 | 72 6b 73 20 43 6f 64 65 | Metrowe|rks Code|
|00001fd0| 57 61 72 72 69 6f 72 20 | 43 20 73 74 79 6c 65 20 |Warrior |C style |
|00001fe0| 6f 66 20 70 72 69 6e 74 | 69 6e 67 0d 09 09 09 4e |of print|ing....N|
|00001ff0| 41 4e 73 2c 20 65 2e 67 | 2e 20 4e 41 4e 28 30 32 |ANs, e.g|. NAN(02|
|00002000| 31 29 0d 39 2f 31 30 2f | 39 34 09 64 67 70 09 74 |1).9/10/|94.dgp.t|
|00002010| 68 65 20 76 61 72 69 61 | 62 6c 65 20 22 65 72 72 |he varia|ble "err|
|00002020| 6f 72 22 20 69 73 20 6e | 6f 77 20 61 6c 77 61 79 |or" is n|ow alway|
|00002030| 73 20 64 65 63 6c 61 72 | 65 64 20 69 6e 74 2e 20 |s declar|ed int. |
|00002040| 28 53 6f 20 69 74 27 73 | 20 73 61 66 65 20 74 6f |(So it's| safe to|
|00002050| 20 70 72 69 6e 74 20 77 | 69 74 68 20 25 64 2e 29 | print w|ith %d.)|
|00002060| 0d 2a 2f 0d 23 69 6e 63 | 6c 75 64 65 20 22 56 69 |.*/.#inc|lude "Vi|
|00002070| 64 65 6f 54 6f 6f 6c 62 | 6f 78 2e 68 22 0d 23 69 |deoToolb|ox.h".#i|
|00002080| 6e 63 6c 75 64 65 20 3c | 61 73 73 65 72 74 2e 68 |nclude <|assert.h|
|00002090| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 63 74 79 70 |>.#inclu|de <ctyp|
|000020a0| 65 2e 68 3e 0d 23 69 6e | 63 6c 75 64 65 20 3c 6d |e.h>.#in|clude <m|
|000020b0| 61 74 68 2e 68 3e 0d 23 | 69 6e 63 6c 75 64 65 20 |ath.h>.#|include |
|000020c0| 3c 73 74 64 61 72 67 2e | 68 3e 0d 23 69 6e 63 6c |<stdarg.|h>.#incl|
|000020d0| 75 64 65 20 3c 73 74 64 | 69 6f 2e 68 3e 0d 23 69 |ude <std|io.h>.#i|
|000020e0| 6e 63 6c 75 64 65 20 3c | 73 74 64 6c 69 62 2e 68 |nclude <|stdlib.h|
|000020f0| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 3c 73 74 72 69 |>.#inclu|de <stri|
|00002100| 6e 67 2e 68 3e 0d 23 64 | 65 66 69 6e 65 20 4d 41 |ng.h>.#d|efine MA|
|00002110| 58 5f 4c 49 4e 45 4c 45 | 4e 47 54 48 20 37 36 0d |X_LINELE|NGTH 76.|
|00002120| 2f 2a 0d 49 73 4e 61 6e | 20 61 6e 64 20 49 73 46 |/*.IsNan| and IsF|
|00002130| 69 6e 69 74 65 2d 2d 73 | 65 65 20 56 69 64 65 6f |inite--s|ee Video|
|00002140| 54 6f 6f 6c 62 6f 78 2e | 68 2d 2d 73 68 6f 75 6c |Toolbox.|h--shoul|
|00002150| 64 20 77 6f 72 6b 20 6f | 6e 20 6d 6f 73 74 20 49 |d work o|n most I|
|00002160| 6e 74 65 6c 20 61 6e 64 | 20 4d 6f 74 6f 72 6f 6c |ntel and| Motorol|
|00002170| 61 0d 70 72 6f 63 65 73 | 73 6f 72 73 2e 20 49 66 |a.proces|sors. If|
|00002180| 20 49 73 4e 61 6e 20 61 | 6e 64 20 49 73 46 69 6e | IsNan a|nd IsFin|
|00002190| 69 74 65 20 64 6f 6e 27 | 74 20 77 6f 72 6b 20 6f |ite don'|t work o|
|000021a0| 6e 20 79 6f 75 72 20 63 | 6f 6d 70 75 74 65 72 2c |n your c|omputer,|
|000021b0| 20 64 6f 6e 27 74 20 66 | 72 65 74 2e 20 54 68 65 | don't f|ret. The|
|000021c0| 79 0d 61 72 65 20 75 73 | 65 64 20 73 6f 6c 65 6c |y.are us|ed solel|
|000021d0| 79 20 62 79 20 55 6e 65 | 71 75 61 6c 44 65 73 63 |y by Une|qualDesc|
|000021e0| 72 69 62 65 64 56 61 72 | 50 61 69 72 2e 20 41 20 |ribedVar|Pair. A |
|000021f0| 71 75 69 63 6b 20 66 69 | 78 20 69 73 20 74 6f 20 |quick fi|x is to |
|00002200| 75 73 65 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |use the |followin|
|00002210| 67 0d 64 65 66 69 6e 69 | 74 69 6f 6e 73 2c 20 74 |g.defini|tions, t|
|00002220| 68 65 20 6f 6e 6c 79 20 | 62 61 64 20 65 66 66 65 |he only |bad effe|
|00002230| 63 74 20 6f 66 20 77 68 | 69 63 68 20 77 69 6c 6c |ct of wh|ich will|
|00002240| 20 62 65 20 74 68 61 74 | 20 63 6f 6d 70 61 72 69 | be that| compari|
|00002250| 73 6f 6e 73 20 6f 66 20 | 4e 41 4e 73 20 6d 61 79 |sons of |NANs may|
|00002260| 0d 61 70 70 65 61 72 20 | 73 70 75 72 69 6f 75 73 |.appear |spurious|
|00002270| 6c 79 20 75 6e 65 71 75 | 61 6c 2e 0d 2a 2f 0d 23 |ly unequ|al..*/.#|
|00002280| 69 66 6e 64 65 66 20 49 | 73 46 69 6e 69 74 65 0d |ifndef I|sFinite.|
|00002290| 09 23 64 65 66 69 6e 65 | 20 49 73 4e 61 6e 28 78 |.#define| IsNan(x|
|000022a0| 29 20 30 0d 09 23 64 65 | 66 69 6e 65 20 49 73 46 |) 0..#de|fine IsF|
|000022b0| 69 6e 69 74 65 28 78 29 | 20 31 0d 23 65 6e 64 69 |inite(x)| 1.#endi|
|000022c0| 66 0d 44 65 73 63 72 69 | 70 74 69 6f 6e 20 53 65 |f.Descri|ption Se|
|000022d0| 74 41 56 61 72 69 61 62 | 6c 65 28 73 68 6f 72 74 |tAVariab|le(short|
|000022e0| 20 74 79 70 65 2c 76 6f | 69 64 20 2a 70 74 72 2c | type,vo|id *ptr,|
|000022f0| 63 68 61 72 20 2a 6e 61 | 6d 65 2c 75 6e 73 69 67 |char *na|me,unsig|
|00002300| 6e 65 64 20 6c 6f 6e 67 | 20 64 69 6d 0d 09 2c 63 |ned long| dim..,c|
|00002310| 6f 6e 73 74 20 63 68 61 | 72 20 2a 63 6f 6d 6d 65 |onst cha|r *comme|
|00002320| 6e 74 29 3b 09 2f 2a 20 | 6f 6c 64 20 73 74 79 6c |nt);./* |old styl|
|00002330| 65 20 2a 2f 0d 0d 2f 2a | 20 74 68 65 20 66 6f 6c |e */../*| the fol|
|00002340| 6c 6f 77 69 6e 67 20 61 | 72 65 20 70 72 69 76 61 |lowing a|re priva|
|00002350| 74 65 2c 20 6e 6f 74 20 | 69 6e 74 65 6e 64 65 64 |te, not |intended|
|00002360| 20 66 6f 72 20 75 73 65 | 20 6f 75 74 73 69 64 65 | for use| outside|
|00002370| 20 74 68 69 73 20 66 69 | 6c 65 20 2a 2f 0d 23 64 | this fi|le */.#d|
|00002380| 65 66 69 6e 65 20 49 73 | 49 6e 74 65 67 72 61 6c |efine Is|Integral|
|00002390| 28 74 79 70 65 29 20 28 | 28 74 79 70 65 29 3e 3d |(type) (|(type)>=|
|000023a0| 63 68 61 72 54 79 70 65 | 26 26 28 74 79 70 65 29 |charType|&&(type)|
|000023b0| 3c 3d 75 6e 73 69 67 6e | 65 64 4c 6f 6e 67 54 79 |<=unsign|edLongTy|
|000023c0| 70 65 20 7c 7c 20 28 74 | 79 70 65 29 3e 3d 63 68 |pe || (t|ype)>=ch|
|000023d0| 61 72 50 74 72 54 79 70 | 65 26 26 28 74 79 70 65 |arPtrTyp|e&&(type|
|000023e0| 29 3c 3d 75 6e 73 69 67 | 6e 65 64 4c 6f 6e 67 50 |)<=unsig|nedLongP|
|000023f0| 74 72 54 79 70 65 29 0d | 23 64 65 66 69 6e 65 20 |trType).|#define |
|00002400| 49 73 46 6c 6f 61 74 69 | 6e 67 28 74 79 70 65 29 |IsFloati|ng(type)|
|00002410| 20 28 28 74 79 70 65 29 | 3e 3d 66 6c 6f 61 74 54 | ((type)|>=floatT|
|00002420| 79 70 65 26 26 28 74 79 | 70 65 29 3c 3d 64 6f 75 |ype&&(ty|pe)<=dou|
|00002430| 62 6c 65 54 79 70 65 20 | 7c 7c 20 28 74 79 70 65 |bleType ||| (type|
|00002440| 29 3e 3d 66 6c 6f 61 74 | 50 74 72 54 79 70 65 26 |)>=float|PtrType&|
|00002450| 26 28 74 79 70 65 29 3c | 3d 64 6f 75 62 6c 65 50 |&(type)<|=doubleP|
|00002460| 74 72 54 79 70 65 29 0d | 23 64 65 66 69 6e 65 20 |trType).|#define |
|00002470| 49 73 53 74 72 69 6e 67 | 28 74 79 70 65 29 20 28 |IsString|(type) (|
|00002480| 74 79 70 65 3d 3d 73 74 | 72 69 6e 67 54 79 70 65 |type==st|ringType|
|00002490| 29 0d 23 64 65 66 69 6e | 65 20 49 73 50 74 72 28 |).#defin|e IsPtr(|
|000024a0| 74 79 70 65 29 20 28 28 | 74 79 70 65 29 3e 3d 63 |type) ((|type)>=c|
|000024b0| 68 61 72 50 74 72 54 79 | 70 65 26 26 28 74 79 70 |harPtrTy|pe&&(typ|
|000024c0| 65 29 3c 3d 64 6f 75 62 | 6c 65 50 74 72 54 79 70 |e)<=doub|lePtrTyp|
|000024d0| 65 29 0d 6c 6f 6e 67 20 | 43 68 65 63 6b 41 44 65 |e).long |CheckADe|
|000024e0| 73 63 72 69 70 74 69 6f | 6e 28 44 65 73 63 72 69 |scriptio|n(Descri|
|000024f0| 70 74 69 6f 6e 20 2a 64 | 2c 63 6f 6e 73 74 20 63 |ption *d|,const c|
|00002500| 68 61 72 20 2a 68 65 72 | 65 2c 73 68 6f 72 74 20 |har *her|e,short |
|00002510| 66 6c 61 67 73 29 3b 0d | 6c 6f 6e 67 20 43 68 65 |flags);.|long Che|
|00002520| 63 6b 44 65 73 63 72 69 | 70 74 69 6f 6e 73 28 44 |ckDescri|ptions(D|
|00002530| 65 73 63 72 69 70 74 69 | 6f 6e 20 64 5b 5d 2c 63 |escripti|on d[],c|
|00002540| 6f 6e 73 74 20 63 68 61 | 72 20 2a 68 65 72 65 2c |onst cha|r *here,|
|00002550| 73 68 6f 72 74 20 66 6c | 61 67 73 29 3b 0d 76 6f |short fl|ags);.vo|
|00002560| 69 64 20 46 72 65 65 41 | 50 74 72 44 65 73 63 72 |id FreeA|PtrDescr|
|00002570| 69 70 74 69 6f 6e 28 44 | 65 73 63 72 69 70 74 69 |iption(D|escripti|
|00002580| 6f 6e 20 2a 64 2c 73 68 | 6f 72 74 20 66 6c 61 67 |on *d,sh|ort flag|
|00002590| 73 29 3b 0d 76 6f 69 64 | 20 46 72 65 65 41 53 74 |s);.void| FreeASt|
|000025a0| 72 69 6e 67 44 65 73 63 | 72 69 70 74 69 6f 6e 28 |ringDesc|ription(|
|000025b0| 44 65 73 63 72 69 70 74 | 69 6f 6e 20 2a 64 2c 73 |Descript|ion *d,s|
|000025c0| 68 6f 72 74 20 66 6c 61 | 67 73 29 3b 0d 63 68 61 |hort fla|gs);.cha|
|000025d0| 72 20 2a 47 65 74 4e 61 | 6d 65 28 63 68 61 72 20 |r *GetNa|me(char |
|000025e0| 2a 2a 73 50 74 72 2c 73 | 68 6f 72 74 20 66 6c 61 |**sPtr,s|hort fla|
|000025f0| 67 73 29 3b 0d 63 68 61 | 72 20 2a 47 65 74 51 75 |gs);.cha|r *GetQu|
|00002600| 6f 74 65 64 53 74 72 69 | 6e 67 28 46 49 4c 45 20 |otedStri|ng(FILE |
|00002610| 2a 73 74 72 65 61 6d 2c | 63 68 61 72 20 2a 6c 69 |*stream,|char *li|
|00002620| 6e 65 42 75 66 66 65 72 | 2c 63 68 61 72 20 2a 73 |neBuffer|,char *s|
|00002630| 2c 63 68 61 72 20 2a 2a | 73 50 74 72 2c 73 68 6f |,char **|sPtr,sho|
|00002640| 72 74 20 66 6c 61 67 73 | 29 3b 0d 6c 6f 6e 67 20 |rt flags|);.long |
|00002650| 48 65 78 41 73 73 69 67 | 6e 6d 65 6e 74 28 46 49 |HexAssig|nment(FI|
|00002660| 4c 45 20 2a 73 74 72 65 | 61 6d 2c 63 68 61 72 20 |LE *stre|am,char |
|00002670| 2a 6c 69 6e 65 42 75 66 | 66 65 72 2c 63 68 61 72 |*lineBuf|fer,char|
|00002680| 20 2a 2a 73 50 74 72 2c | 44 65 73 63 72 69 70 74 | **sPtr,|Descript|
|00002690| 69 6f 6e 20 2a 64 0d 09 | 2c 69 6e 74 20 73 75 62 |ion *d..|,int sub|
|000026a0| 73 63 72 69 70 74 44 69 | 6d 73 2c 6c 6f 6e 67 20 |scriptDi|ms,long |
|000026b0| 69 6e 64 65 78 2c 6c 6f | 6e 67 20 2a 62 79 74 65 |index,lo|ng *byte|
|000026c0| 73 50 74 72 2c 73 68 6f | 72 74 20 66 6c 61 67 73 |sPtr,sho|rt flags|
|000026d0| 29 3b 0d 63 68 61 72 20 | 2a 4e 65 78 74 54 6f 6b |);.char |*NextTok|
|000026e0| 65 6e 28 46 49 4c 45 20 | 2a 73 74 72 65 61 6d 2c |en(FILE |*stream,|
|000026f0| 63 68 61 72 20 2a 6c 69 | 6e 65 42 75 66 66 65 72 |char *li|neBuffer|
|00002700| 2c 63 68 61 72 20 2a 73 | 2c 73 68 6f 72 74 20 66 |,char *s|,short f|
|00002710| 6c 61 67 73 29 3b 0d 63 | 68 61 72 20 2a 4e 65 78 |lags);.c|har *Nex|
|00002720| 74 54 6f 6b 65 6e 49 6e | 4c 69 6e 65 28 46 49 4c |tTokenIn|Line(FIL|
|00002730| 45 20 2a 73 74 72 65 61 | 6d 2c 63 68 61 72 20 2a |E *strea|m,char *|
|00002740| 6c 69 6e 65 42 75 66 66 | 65 72 2c 63 68 61 72 20 |lineBuff|er,char |
|00002750| 2a 73 2c 73 68 6f 72 74 | 20 66 6c 61 67 73 29 3b |*s,short| flags);|
|00002760| 0d 63 68 61 72 20 2a 4e | 65 78 74 54 6f 6b 65 6e |.char *N|extToken|
|00002770| 49 6e 54 68 69 73 4f 72 | 4e 65 78 74 4c 69 6e 65 |InThisOr|NextLine|
|00002780| 28 46 49 4c 45 20 2a 73 | 74 72 65 61 6d 2c 63 68 |(FILE *s|tream,ch|
|00002790| 61 72 20 2a 6c 69 6e 65 | 42 75 66 66 65 72 2c 63 |ar *line|Buffer,c|
|000027a0| 68 61 72 20 2a 73 2c 73 | 68 6f 72 74 20 66 6c 61 |har *s,s|hort fla|
|000027b0| 67 73 29 3b 0d 69 6e 74 | 20 50 61 72 73 65 4e 61 |gs);.int| ParseNa|
|000027c0| 6d 65 28 63 68 61 72 20 | 2a 2a 73 50 74 72 29 3b |me(char |**sPtr);|
|000027d0| 0d 76 6f 69 64 20 50 61 | 72 73 69 6e 67 45 72 72 |.void Pa|rsingErr|
|000027e0| 6f 72 28 63 68 61 72 20 | 2a 73 2c 63 68 61 72 20 |or(char |*s,char |
|000027f0| 2a 66 6f 72 6d 61 74 2c | 2e 2e 2e 29 3b 0d 6c 6f |*format,|...);.lo|
|00002800| 6e 67 20 50 72 69 6e 74 | 41 6e 41 73 73 69 67 6e |ng Print|AnAssign|
|00002810| 6d 65 6e 74 4f 66 45 6c | 65 6d 65 6e 74 28 46 49 |mentOfEl|ement(FI|
|00002820| 4c 45 20 2a 73 74 72 65 | 61 6d 2c 44 65 73 63 72 |LE *stre|am,Descr|
|00002830| 69 70 74 69 6f 6e 20 2a | 64 2c 6c 6f 6e 67 20 69 |iption *|d,long i|
|00002840| 6e 64 65 78 2c 73 68 6f | 72 74 20 66 6c 61 67 73 |ndex,sho|rt flags|
|00002850| 29 3b 0d 76 6f 69 64 20 | 50 72 69 6e 74 51 75 6f |);.void |PrintQuo|
|00002860| 74 65 64 53 74 72 69 6e | 67 28 46 49 4c 45 20 2a |tedStrin|g(FILE *|
|00002870| 73 74 72 65 61 6d 2c 73 | 68 6f 72 74 20 2a 6c 69 |stream,s|hort *li|
|00002880| 6e 65 4c 65 6e 67 74 68 | 50 74 72 2c 63 6f 6e 73 |neLength|Ptr,cons|
|00002890| 74 20 63 68 61 72 20 2a | 73 0d 09 2c 63 6f 6e 73 |t char *|s..,cons|
|000028a0| 74 20 63 68 61 72 20 2a | 6f 70 65 6e 51 75 6f 74 |t char *|openQuot|
|000028b0| 65 2c 63 6f 6e 73 74 20 | 63 68 61 72 20 2a 63 6c |e,const |char *cl|
|000028c0| 6f 73 65 51 75 6f 74 65 | 29 3b 0d 63 68 61 72 20 |oseQuote|);.char |
|000028d0| 2a 52 65 61 64 4c 69 6e | 65 28 63 68 61 72 20 2a |*ReadLin|e(char *|
|000028e0| 6c 69 6e 65 42 75 66 66 | 65 72 2c 73 69 7a 65 5f |lineBuff|er,size_|
|000028f0| 74 20 62 75 66 66 65 72 | 53 69 7a 65 2c 46 49 4c |t buffer|Size,FIL|
|00002900| 45 20 2a 73 74 72 65 61 | 6d 2c 73 68 6f 72 74 20 |E *strea|m,short |
|00002910| 66 6c 61 67 73 29 3b 0d | 64 6f 75 62 6c 65 20 73 |flags);.|double s|
|00002920| 74 72 74 6f 64 4e 28 63 | 68 61 72 20 2a 73 2c 63 |trtodN(c|har *s,c|
|00002930| 68 61 72 20 2a 2a 73 50 | 74 72 29 3b 0d 6c 6f 6e |har **sP|tr);.lon|
|00002940| 67 20 73 74 72 74 6f 6c | 4e 28 63 68 61 72 20 2a |g strtol|N(char *|
|00002950| 73 2c 63 68 61 72 20 2a | 2a 73 50 74 72 2c 73 68 |s,char *|*sPtr,sh|
|00002960| 6f 72 74 20 66 6c 61 67 | 73 29 3b 0d 75 6e 73 69 |ort flag|s);.unsi|
|00002970| 67 6e 65 64 20 6c 6f 6e | 67 20 73 74 72 74 6f 75 |gned lon|g strtou|
|00002980| 6c 4e 28 63 68 61 72 20 | 2a 73 2c 63 68 61 72 20 |lN(char |*s,char |
|00002990| 2a 2a 73 50 74 72 2c 73 | 68 6f 72 74 20 66 6c 61 |**sPtr,s|hort fla|
|000029a0| 67 73 29 3b 0d 63 68 61 | 72 20 73 74 72 74 6f 63 |gs);.cha|r strtoc|
|000029b0| 28 63 68 61 72 20 2a 73 | 2c 63 68 61 72 20 2a 2a |(char *s|,char **|
|000029c0| 73 50 74 72 29 3b 0d 23 | 64 65 66 69 6e 65 20 73 |sPtr);.#|define s|
|000029d0| 74 72 65 71 32 28 73 31 | 2c 73 32 29 20 28 73 74 |treq2(s1|,s2) (st|
|000029e0| 72 6e 63 6d 70 28 73 31 | 2c 73 32 2c 73 74 72 6c |rncmp(s1|,s2,strl|
|000029f0| 65 6e 28 73 32 29 29 3d | 3d 30 29 0d 23 64 65 66 |en(s2))=|=0).#def|
|00002a00| 69 6e 65 20 73 74 72 65 | 71 28 73 31 2c 73 32 29 |ine stre|q(s1,s2)|
|00002a10| 20 28 73 74 72 63 6d 70 | 28 73 31 2c 73 32 29 3d | (strcmp|(s1,s2)=|
|00002a20| 3d 30 29 0d 6c 6f 6e 67 | 20 44 69 6d 73 28 44 65 |=0).long| Dims(De|
|00002a30| 73 63 72 69 70 74 69 6f | 6e 20 2a 64 29 3b 0d 63 |scriptio|n *d);.c|
|00002a40| 68 61 72 20 2a 45 6c 65 | 6d 65 6e 74 4e 61 6d 65 |har *Ele|mentName|
|00002a50| 28 63 68 61 72 20 2a 73 | 2c 44 65 73 63 72 69 70 |(char *s|,Descrip|
|00002a60| 74 69 6f 6e 20 2a 64 2c | 6c 6f 6e 67 20 69 6e 64 |tion *d,|long ind|
|00002a70| 65 78 29 3b 0d 76 6f 69 | 64 20 2a 45 6c 65 6d 65 |ex);.voi|d *Eleme|
|00002a80| 6e 74 50 74 72 28 44 65 | 73 63 72 69 70 74 69 6f |ntPtr(De|scriptio|
|00002a90| 6e 20 2a 64 2c 6c 6f 6e | 67 20 69 6e 64 65 78 29 |n *d,lon|g index)|
|00002aa0| 3b 0d 6c 6f 6e 67 20 45 | 6c 65 6d 65 6e 74 73 28 |;.long E|lements(|
|00002ab0| 44 65 73 63 72 69 70 74 | 69 6f 6e 20 2a 64 29 3b |Descript|ion *d);|
|00002ac0| 0d 76 6f 69 64 20 45 6c | 65 6d 65 6e 74 53 75 62 |.void El|ementSub|
|00002ad0| 73 63 72 69 70 74 28 44 | 65 73 63 72 69 70 74 69 |script(D|escripti|
|00002ae0| 6f 6e 20 2a 64 2c 6c 6f | 6e 67 20 69 6e 64 65 78 |on *d,lo|ng index|
|00002af0| 2c 6c 6f 6e 67 20 73 75 | 62 5b 41 53 53 49 47 4e |,long su|b[ASSIGN|
|00002b00| 5f 44 49 4d 53 5d 29 3b | 0d 6c 6f 6e 67 20 45 6c |_DIMS]);|.long El|
|00002b10| 65 6d 65 6e 74 49 6e 64 | 65 78 28 44 65 73 63 72 |ementInd|ex(Descr|
|00002b20| 69 70 74 69 6f 6e 20 2a | 64 2c 6c 6f 6e 67 20 73 |iption *|d,long s|
|00002b30| 75 62 5b 41 53 53 49 47 | 4e 5f 44 49 4d 53 5d 29 |ub[ASSIG|N_DIMS])|
|00002b40| 3b 0d 69 6e 74 20 47 65 | 74 44 69 6d 65 6e 73 69 |;.int Ge|tDimensi|
|00002b50| 6f 6e 73 28 44 65 73 63 | 72 69 70 74 69 6f 6e 20 |ons(Desc|ription |
|00002b60| 2a 64 2c 69 6e 74 20 73 | 75 62 73 63 72 69 70 74 |*d,int s|ubscript|
|00002b70| 44 69 6d 73 2c 6c 6f 6e | 67 20 73 75 62 73 63 72 |Dims,lon|g subscr|
|00002b80| 69 70 74 5b 41 53 53 49 | 47 4e 5f 44 49 4d 53 5d |ipt[ASSI|GN_DIMS]|
|00002b90| 2c 73 68 6f 72 74 20 66 | 6c 61 67 73 29 3b 0d 69 |,short f|lags);.i|
|00002ba0| 6e 74 20 41 6c 6c 6f 63 | 61 74 65 44 65 73 63 72 |nt Alloc|ateDescr|
|00002bb0| 69 62 65 64 50 74 72 56 | 61 72 73 28 44 65 73 63 |ibedPtrV|ars(Desc|
|00002bc0| 72 69 70 74 69 6f 6e 20 | 64 65 73 63 72 69 70 74 |ription |descript|
|00002bd0| 69 6f 6e 5b 5d 2c 63 6f | 6e 73 74 20 63 68 61 72 |ion[],co|nst char|
|00002be0| 20 2a 68 65 72 65 2c 73 | 68 6f 72 74 20 66 6c 61 | *here,s|hort fla|
|00002bf0| 67 73 29 3b 0d 23 69 66 | 6e 64 65 66 20 54 52 55 |gs);.#if|ndef TRU|
|00002c00| 45 0d 09 23 64 65 66 69 | 6e 65 20 46 41 4c 53 45 |E..#defi|ne FALSE|
|00002c10| 09 30 0d 09 23 64 65 66 | 69 6e 65 20 54 52 55 45 |.0..#def|ine TRUE|
|00002c20| 09 31 0d 23 65 6e 64 69 | 66 0d 23 64 65 66 69 6e |.1.#endi|f.#defin|
|00002c30| 65 20 54 4f 4c 45 52 41 | 4e 43 45 09 31 65 2d 36 |e TOLERA|NCE.1e-6|
|00002c40| 09 2f 2a 20 66 72 61 63 | 74 69 6f 6e 61 6c 20 64 |./* frac|tional d|
|00002c50| 69 66 66 65 72 65 6e 63 | 65 20 62 65 74 77 65 65 |ifferenc|e betwee|
|00002c60| 6e 20 74 77 6f 20 22 65 | 71 75 61 6c 22 20 66 6c |n two "e|qual" fl|
|00002c70| 6f 61 74 73 20 2a 2f 0d | 23 64 65 66 69 6e 65 20 |oats */.|#define |
|00002c80| 42 55 46 46 45 52 5f 53 | 49 5a 45 20 35 31 32 0d |BUFFER_S|IZE 512.|
|00002c90| 23 64 65 66 69 6e 65 20 | 45 43 48 4f 5f 41 53 53 |#define |ECHO_ASS|
|00002ca0| 49 47 4e 4d 45 4e 54 53 | 09 28 66 6c 61 67 73 26 |IGNMENTS|.(flags&|
|00002cb0| 61 73 73 69 67 6e 45 63 | 68 6f 41 73 73 69 67 6e |assignEc|hoAssign|
|00002cc0| 6d 65 6e 74 73 20 26 26 | 20 21 28 66 6c 61 67 73 |ments &&| !(flags|
|00002cd0| 26 61 73 73 69 67 6e 53 | 63 61 6e 29 29 0d 23 64 |&assignS|can)).#d|
|00002ce0| 65 66 69 6e 65 20 45 43 | 48 4f 5f 43 4f 4d 4d 45 |efine EC|HO_COMME|
|00002cf0| 4e 54 53 09 09 28 66 6c | 61 67 73 26 61 73 73 69 |NTS..(fl|ags&assi|
|00002d00| 67 6e 45 63 68 6f 43 6f | 6d 6d 65 6e 74 73 20 26 |gnEchoCo|mments &|
|00002d10| 26 20 21 28 66 6c 61 67 | 73 26 61 73 73 69 67 6e |& !(flag|s&assign|
|00002d20| 53 63 61 6e 29 29 0d 23 | 64 65 66 69 6e 65 20 45 |Scan)).#|define E|
|00002d30| 43 48 4f 5f 46 49 4c 45 | 09 09 09 28 66 6c 61 67 |CHO_FILE|...(flag|
|00002d40| 73 26 61 73 73 69 67 6e | 45 63 68 6f 46 69 6c 65 |s&assign|EchoFile|
|00002d50| 20 26 26 20 21 28 66 6c | 61 67 73 26 61 73 73 69 | && !(fl|ags&assi|
|00002d60| 67 6e 53 63 61 6e 29 29 | 0d 23 64 65 66 69 6e 65 |gnScan))|.#define|
|00002d70| 20 50 52 49 4e 54 46 5f | 45 58 49 54 09 09 09 21 | PRINTF_|EXIT...!|
|00002d80| 28 66 6c 61 67 73 26 61 | 73 73 69 67 6e 4e 6f 50 |(flags&a|ssignNoP|
|00002d90| 72 69 6e 74 66 45 78 69 | 74 29 0d 0d 73 74 61 74 |rintfExi|t)..stat|
|00002da0| 69 63 20 69 6e 74 20 6c | 69 6e 65 57 61 73 42 6c |ic int l|ineWasBl|
|00002db0| 61 6e 6b 3d 31 3b 09 2f | 2a 20 75 73 65 64 20 69 |ank=1;./|* used i|
|00002dc0| 6e 20 52 65 61 64 41 73 | 73 69 67 6e 6d 65 6e 74 |n ReadAs|signment|
|00002dd0| 4c 69 6e 65 28 29 2c 09 | 2a 2f 0d 09 09 09 2f 2a |Line(),.|*/..../*|
|00002de0| 20 4e 65 78 74 54 6f 6b | 65 6e 49 6e 54 68 69 73 | NextTok|enInThis|
|00002df0| 4f 72 4e 65 78 74 4c 69 | 6e 65 28 29 2c 20 61 6e |OrNextLi|ne(), an|
|00002e00| 64 20 41 73 73 69 67 6e | 6d 65 6e 74 4c 69 6e 65 |d Assign|mentLine|
|00002e10| 57 61 73 42 6c 61 6e 6b | 28 29 2e 2a 2f 0d 73 68 |WasBlank|().*/.sh|
|00002e20| 6f 72 74 20 74 79 70 65 | 53 69 7a 65 5b 5d 3d 7b |ort type|Size[]={|
|00002e30| 30 0d 09 2c 73 69 7a 65 | 6f 66 28 63 68 61 72 29 |0..,size|of(char)|
|00002e40| 2c 73 69 7a 65 6f 66 28 | 75 6e 73 69 67 6e 65 64 |,sizeof(|unsigned|
|00002e50| 20 63 68 61 72 29 0d 09 | 2c 73 69 7a 65 6f 66 28 | char)..|,sizeof(|
|00002e60| 73 68 6f 72 74 29 2c 73 | 69 7a 65 6f 66 28 75 6e |short),s|izeof(un|
|00002e70| 73 69 67 6e 65 64 20 73 | 68 6f 72 74 29 0d 09 2c |signed s|hort)..,|
|00002e80| 73 69 7a 65 6f 66 28 6c | 6f 6e 67 29 2c 73 69 7a |sizeof(l|ong),siz|
|00002e90| 65 6f 66 28 75 6e 73 69 | 67 6e 65 64 20 6c 6f 6e |eof(unsi|gned lon|
|00002ea0| 67 29 0d 09 2c 73 69 7a | 65 6f 66 28 66 6c 6f 61 |g)..,siz|eof(floa|
|00002eb0| 74 29 0d 09 23 69 66 20 | 53 48 4f 52 54 5f 44 4f |t)..#if |SHORT_DO|
|00002ec0| 55 42 4c 45 5f 4f 4b 0d | 09 09 2c 73 69 7a 65 6f |UBLE_OK.|..,sizeo|
|00002ed0| 66 28 73 68 6f 72 74 20 | 64 6f 75 62 6c 65 29 0d |f(short |double).|
|00002ee0| 09 23 65 6e 64 69 66 0d | 09 2c 73 69 7a 65 6f 66 |.#endif.|.,sizeof|
|00002ef0| 28 64 6f 75 62 6c 65 29 | 0d 09 2c 73 69 7a 65 6f |(double)|..,sizeo|
|00002f00| 66 28 63 68 61 72 29 2c | 73 69 7a 65 6f 66 28 75 |f(char),|sizeof(u|
|00002f10| 6e 73 69 67 6e 65 64 20 | 63 68 61 72 29 0d 09 2c |nsigned |char)..,|
|00002f20| 73 69 7a 65 6f 66 28 73 | 68 6f 72 74 29 2c 73 69 |sizeof(s|hort),si|
|00002f30| 7a 65 6f 66 28 75 6e 73 | 69 67 6e 65 64 20 73 68 |zeof(uns|igned sh|
|00002f40| 6f 72 74 29 0d 09 2c 73 | 69 7a 65 6f 66 28 6c 6f |ort)..,s|izeof(lo|
|00002f50| 6e 67 29 2c 73 69 7a 65 | 6f 66 28 75 6e 73 69 67 |ng),size|of(unsig|
|00002f60| 6e 65 64 20 6c 6f 6e 67 | 29 0d 09 2c 73 69 7a 65 |ned long|)..,size|
|00002f70| 6f 66 28 66 6c 6f 61 74 | 29 0d 09 23 69 66 20 53 |of(float|)..#if S|
|00002f80| 48 4f 52 54 5f 44 4f 55 | 42 4c 45 5f 4f 4b 0d 09 |HORT_DOU|BLE_OK..|
|00002f90| 09 2c 73 69 7a 65 6f 66 | 28 73 68 6f 72 74 20 64 |.,sizeof|(short d|
|00002fa0| 6f 75 62 6c 65 29 0d 09 | 23 65 6e 64 69 66 0d 09 |ouble)..|#endif..|
|00002fb0| 2c 73 69 7a 65 6f 66 28 | 64 6f 75 62 6c 65 29 0d |,sizeof(|double).|
|00002fc0| 09 2c 73 69 7a 65 6f 66 | 28 63 68 61 72 20 2a 29 |.,sizeof|(char *)|
|00002fd0| 0d 09 2c 30 0d 7d 3b 0d | 63 68 61 72 20 74 79 70 |..,0.};.|char typ|
|00002fe0| 65 4e 61 6d 65 5b 5d 5b | 32 30 5d 3d 7b 22 6e 6f |eName[][|20]={"no|
|00002ff0| 6e 65 22 0d 09 2c 22 63 | 68 61 72 22 2c 22 75 6e |ne"..,"c|har","un|
|00003000| 73 69 67 6e 65 64 20 63 | 68 61 72 22 2c 22 73 68 |signed c|har","sh|
|00003010| 6f 72 74 22 2c 22 75 6e | 73 69 67 6e 65 64 20 73 |ort","un|signed s|
|00003020| 68 6f 72 74 22 0d 09 2c | 22 6c 6f 6e 67 22 2c 22 |hort"..,|"long","|
|00003030| 75 6e 73 69 67 6e 65 64 | 20 6c 6f 6e 67 22 2c 22 |unsigned| long","|
|00003040| 66 6c 6f 61 74 22 0d 09 | 23 69 66 20 53 48 4f 52 |float"..|#if SHOR|
|00003050| 54 5f 44 4f 55 42 4c 45 | 5f 4f 4b 0d 09 09 2c 22 |T_DOUBLE|_OK...,"|
|00003060| 73 68 6f 72 74 20 64 6f | 75 62 6c 65 22 0d 09 23 |short do|uble"..#|
|00003070| 65 6e 64 69 66 0d 09 2c | 22 64 6f 75 62 6c 65 22 |endif..,|"double"|
|00003080| 0d 09 2c 22 63 68 61 72 | 20 2a 22 2c 22 75 6e 73 |..,"char| *","uns|
|00003090| 69 67 6e 65 64 20 63 68 | 61 72 20 2a 22 2c 22 73 |igned ch|ar *","s|
|000030a0| 68 6f 72 74 20 2a 22 2c | 22 75 6e 73 69 67 6e 65 |hort *",|"unsigne|
|000030b0| 64 20 73 68 6f 72 74 20 | 2a 22 0d 09 2c 22 6c 6f |d short |*"..,"lo|
|000030c0| 6e 67 20 2a 22 2c 22 75 | 6e 73 69 67 6e 65 64 20 |ng *","u|nsigned |
|000030d0| 6c 6f 6e 67 20 2a 22 2c | 22 66 6c 6f 61 74 20 2a |long *",|"float *|
|000030e0| 22 0d 09 23 69 66 20 53 | 48 4f 52 54 5f 44 4f 55 |"..#if S|HORT_DOU|
|000030f0| 42 4c 45 5f 4f 4b 0d 09 | 09 2c 22 73 68 6f 72 74 |BLE_OK..|.,"short|
|00003100| 20 64 6f 75 62 6c 65 20 | 2a 22 0d 09 23 65 6e 64 | double |*"..#end|
|00003110| 69 66 0d 09 2c 22 64 6f | 75 62 6c 65 20 2a 22 0d |if..,"do|uble *".|
|00003120| 09 2c 22 73 74 72 69 6e | 67 22 0d 09 2c 22 75 6e |.,"strin|g"..,"un|
|00003130| 6b 6e 6f 77 6e 22 0d 7d | 3b 0d 65 6e 75 6d 7b 61 |known".}|;.enum{a|
|00003140| 73 73 69 67 6e 4e 65 65 | 64 4d 6f 72 65 3d 30 78 |ssignNee|dMore=0x|
|00003150| 34 30 30 30 2c 61 73 73 | 69 67 6e 41 6c 72 65 61 |4000,ass|ignAlrea|
|00003160| 64 79 43 68 65 63 6b 65 | 64 3d 30 78 32 30 30 30 |dyChecke|d=0x2000|
|00003170| 0d 09 2c 61 73 73 69 67 | 6e 53 63 61 6e 3d 30 78 |..,assig|nScan=0x|
|00003180| 31 30 30 2c 61 73 73 69 | 67 6e 4c 6f 63 61 6c 43 |100,assi|gnLocalC|
|00003190| 61 6c 6c 3d 30 78 32 30 | 30 0d 7d 3b 2f 2a 66 6c |all=0x20|0.};/*fl|
|000031a0| 61 67 73 20 75 73 65 64 | 20 6f 6e 6c 79 20 69 6e |ags used| only in|
|000031b0| 20 74 68 69 73 20 66 69 | 6c 65 2a 2f 0d 0d 2f 2a | this fi|le*/../*|
|000031c0| 0d 52 4f 55 54 49 4e 45 | 3a 20 4f 70 65 6e 43 61 |.ROUTINE|: OpenCa|
|000031d0| 6c 46 69 6c 65 52 65 61 | 64 41 6e 64 43 68 65 63 |lFileRea|dAndChec|
|000031e0| 6b 0d 50 55 52 50 4f 53 | 45 3a 0d 09 4f 70 65 6e |k.PURPOS|E:..Open|
|000031f0| 20 75 70 20 61 20 63 61 | 6c 69 62 72 61 74 69 6f | up a ca|libratio|
|00003200| 6e 20 66 69 6c 65 20 66 | 6f 72 20 72 65 61 64 69 |n file f|or readi|
|00003210| 6e 67 2e 0d 09 0d 09 49 | 66 20 74 68 65 20 66 69 |ng.....I|f the fi|
|00003220| 6c 65 20 65 78 69 73 74 | 73 20 69 6e 20 74 68 65 |le exist|s in the|
|00003230| 20 63 75 72 72 65 6e 74 | 20 64 69 72 65 63 74 6f | current| directo|
|00003240| 72 79 2c 20 69 74 20 69 | 73 20 75 73 65 64 2e 0d |ry, it i|s used..|
|00003250| 09 49 66 20 6e 6f 74 2c | 20 74 68 65 6e 20 69 66 |.If not,| then if|
|00003260| 20 69 74 20 65 78 69 73 | 74 73 20 69 6e 20 74 68 | it exis|ts in th|
|00003270| 65 20 70 72 65 66 65 72 | 65 6e 63 65 73 20 66 6f |e prefer|ences fo|
|00003280| 6c 64 65 72 2c 20 69 74 | 20 75 73 65 64 2e 0d 2a |lder, it| used..*|
|00003290| 2f 0d 0d 46 49 4c 45 20 | 2a 4f 70 65 6e 43 61 6c |/..FILE |*OpenCal|
|000032a0| 46 69 6c 65 52 65 61 64 | 41 6e 64 43 68 65 63 6b |FileRead|AndCheck|
|000032b0| 28 63 68 61 72 20 2a 66 | 69 6c 65 6e 61 6d 65 29 |(char *f|ilename)|
|000032c0| 0d 7b 0d 09 46 49 4c 45 | 20 2a 73 74 72 65 61 6d |.{..FILE| *stream|
|000032d0| 3b 0d 09 0d 09 73 74 72 | 65 61 6d 20 3d 20 4f 70 |;....str|eam = Op|
|000032e0| 65 6e 43 61 6c 46 69 6c | 65 52 65 61 64 28 66 69 |enCalFil|eRead(fi|
|000032f0| 6c 65 6e 61 6d 65 29 3b | 0d 09 69 66 20 28 73 74 |lename);|..if (st|
|00003300| 72 65 61 6d 20 3d 3d 20 | 4e 55 4c 4c 29 0d 09 09 |ream == |NULL)...|
|00003310| 50 72 69 6e 74 66 45 78 | 69 74 28 22 4f 70 65 6e |PrintfEx|it("Open|
|00003320| 43 61 6c 46 69 6c 65 52 | 65 61 64 41 6e 64 43 68 |CalFileR|eadAndCh|
|00003330| 65 63 6b 3a 20 63 61 6e | 6e 6f 74 20 6f 70 65 6e |eck: can|not open|
|00003340| 20 66 69 6c 65 20 5c 22 | 25 73 5c 22 22 2c 66 69 | file \"|%s\"",fi|
|00003350| 6c 65 6e 61 6d 65 29 3b | 0d 09 72 65 74 75 72 6e |lename);|..return|
|00003360| 28 73 74 72 65 61 6d 29 | 3b 09 0d 7d 0d 0d 2f 2a |(stream)|;..}../*|
|00003370| 0d 52 4f 55 54 49 4e 45 | 3a 20 4f 70 65 6e 43 61 |.ROUTINE|: OpenCa|
|00003380| 6c 46 69 6c 65 52 65 61 | 64 0d 50 55 52 50 4f 53 |lFileRea|d.PURPOS|
|00003390| 45 3a 0d 09 4f 70 65 6e | 20 75 70 20 61 20 63 61 |E:..Open| up a ca|
|000033a0| 6c 69 62 72 61 74 69 6f | 6e 20 66 69 6c 65 20 66 |libratio|n file f|
|000033b0| 6f 72 20 72 65 61 64 69 | 6e 67 2e 20 20 44 6f 6e |or readi|ng. Don|
|000033c0| 27 74 20 61 62 6f 72 74 | 20 6f 6e 20 65 72 72 6f |'t abort| on erro|
|000033d0| 72 2e 0d 09 0d 09 49 66 | 20 74 68 65 20 66 69 6c |r.....If| the fil|
|000033e0| 65 20 65 78 69 73 74 73 | 20 69 6e 20 74 68 65 20 |e exists| in the |
|000033f0| 63 75 72 72 65 6e 74 20 | 64 69 72 65 63 74 6f 72 |current |director|
|00003400| 79 2c 20 69 74 20 69 73 | 20 75 73 65 64 2e 0d 09 |y, it is| used...|
|00003410| 49 66 20 6e 6f 74 2c 20 | 74 68 65 6e 20 69 66 20 |If not, |then if |
|00003420| 69 74 20 65 78 69 73 74 | 73 20 69 6e 20 74 68 65 |it exist|s in the|
|00003430| 20 70 72 65 66 65 72 65 | 6e 63 65 73 20 66 6f 6c | prefere|nces fol|
|00003440| 64 65 72 2c 20 69 74 20 | 75 73 65 64 2e 0d 2a 2f |der, it |used..*/|
|00003450| 0d 0d 46 49 4c 45 20 2a | 4f 70 65 6e 43 61 6c 46 |..FILE *|OpenCalF|
|00003460| 69 6c 65 52 65 61 64 28 | 63 68 61 72 20 2a 66 69 |ileRead(|char *fi|
|00003470| 6c 65 6e 61 6d 65 29 0d | 7b 0d 09 46 49 4c 45 20 |lename).|{..FILE |
|00003480| 2a 73 74 72 65 61 6d 3b | 0d 09 0d 09 2f 2a 20 54 |*stream;|..../* T|
|00003490| 72 79 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 64 |ry the c|urrent d|
|000034a0| 69 72 65 63 74 6f 72 79 | 20 2a 2f 0d 09 73 74 72 |irectory| */..str|
|000034b0| 65 61 6d 20 3d 20 66 6f | 70 65 6e 28 66 69 6c 65 |eam = fo|pen(file|
|000034c0| 6e 61 6d 65 2c 22 72 22 | 29 3b 0d 09 69 66 20 28 |name,"r"|);..if (|
|000034d0| 73 74 72 65 61 6d 20 21 | 3d 20 4e 55 4c 4c 29 20 |stream !|= NULL) |
|000034e0| 72 65 74 75 72 6e 28 73 | 74 72 65 61 6d 29 3b 0d |return(s|tream);.|
|000034f0| 09 0d 09 2f 2a 20 54 72 | 79 20 74 68 65 20 70 72 |.../* Tr|y the pr|
|00003500| 65 66 65 72 65 6e 63 65 | 73 20 66 6f 6c 64 65 72 |eference|s folder|
|00003510| 20 2a 2f 0d 09 4f 70 65 | 6e 50 72 65 66 65 72 65 | */..Ope|nPrefere|
|00003520| 6e 63 65 73 46 6f 6c 64 | 65 72 28 29 3b 0d 09 73 |ncesFold|er();..s|
|00003530| 74 72 65 61 6d 20 3d 20 | 66 6f 70 65 6e 28 66 69 |tream = |fopen(fi|
|00003540| 6c 65 6e 61 6d 65 2c 22 | 72 22 29 3b 0d 09 43 6c |lename,"|r");..Cl|
|00003550| 6f 73 65 50 72 65 66 65 | 72 65 6e 63 65 73 46 6f |osePrefe|rencesFo|
|00003560| 6c 64 65 72 28 29 3b 0d | 09 72 65 74 75 72 6e 28 |lder();.|.return(|
|00003570| 73 74 72 65 61 6d 29 3b | 09 0d 7d 0d 0d 2f 2a 0d |stream);|..}../*.|
|00003580| 52 4f 55 54 49 4e 45 3a | 20 4f 70 65 6e 43 61 6c |ROUTINE:| OpenCal|
|00003590| 46 69 6c 65 57 72 69 74 | 65 0d 50 55 52 50 4f 53 |FileWrit|e.PURPOS|
|000035a0| 45 3a 0d 09 4f 70 65 6e | 20 75 70 20 61 20 63 61 |E:..Open| up a ca|
|000035b0| 6c 69 62 72 61 74 69 6f | 6e 20 66 69 6c 65 20 66 |libratio|n file f|
|000035c0| 6f 72 20 61 70 70 65 6e | 64 69 6e 67 2e 0d 09 0d |or appen|ding....|
|000035d0| 09 49 66 20 74 68 65 20 | 66 69 6c 65 20 65 78 69 |.If the |file exi|
|000035e0| 73 74 73 20 69 6e 20 74 | 68 65 20 63 75 72 72 65 |sts in t|he curre|
|000035f0| 6e 74 20 64 69 72 65 63 | 74 6f 72 79 2c 20 69 74 |nt direc|tory, it|
|00003600| 20 69 73 20 75 73 65 64 | 2e 0d 09 49 66 20 6e 6f | is used|...If no|
|00003610| 74 2c 20 74 68 65 6e 20 | 69 66 20 69 74 20 65 78 |t, then |if it ex|
|00003620| 69 73 74 73 20 69 6e 20 | 74 68 65 20 50 72 65 66 |ists in |the Pref|
|00003630| 65 72 65 6e 63 65 73 20 | 66 6f 6c 64 65 72 2c 20 |erences |folder, |
|00003640| 69 74 20 75 73 65 64 2e | 0d 09 49 66 20 6e 6f 74 |it used.|..If not|
|00003650| 2c 20 74 68 65 20 66 69 | 6c 65 20 69 73 20 63 72 |, the fi|le is cr|
|00003660| 65 61 74 65 64 20 69 6e | 20 74 68 65 20 50 72 65 |eated in| the Pre|
|00003670| 66 65 72 65 6e 63 65 73 | 20 66 6f 6c 64 65 72 2e |ferences| folder.|
|00003680| 0d 2a 2f 0d 0d 46 49 4c | 45 20 2a 4f 70 65 6e 43 |.*/..FIL|E *OpenC|
|00003690| 61 6c 46 69 6c 65 57 72 | 69 74 65 28 63 68 61 72 |alFileWr|ite(char|
|000036a0| 20 2a 66 69 6c 65 6e 61 | 6d 65 29 0d 7b 0d 09 46 | *filena|me).{..F|
|000036b0| 49 4c 45 20 2a 73 74 72 | 65 61 6d 3b 0d 09 0d 09 |ILE *str|eam;....|
|000036c0| 2f 2a 20 54 72 79 20 69 | 6e 20 74 68 65 20 63 75 |/* Try i|n the cu|
|000036d0| 72 72 65 6e 74 20 64 69 | 72 65 63 74 6f 72 79 20 |rrent di|rectory |
|000036e0| 2a 2f 0d 09 73 74 72 65 | 61 6d 20 3d 20 66 6f 70 |*/..stre|am = fop|
|000036f0| 65 6e 28 66 69 6c 65 6e | 61 6d 65 2c 22 72 22 29 |en(filen|ame,"r")|
|00003700| 3b 0d 09 69 66 20 28 73 | 74 72 65 61 6d 20 21 3d |;..if (s|tream !=|
|00003710| 20 4e 55 4c 4c 29 20 7b | 0d 09 09 66 63 6c 6f 73 | NULL) {|...fclos|
|00003720| 65 28 73 74 72 65 61 6d | 29 3b 0d 09 09 73 74 72 |e(stream|);...str|
|00003730| 65 61 6d 20 3d 20 66 6f | 70 65 6e 28 66 69 6c 65 |eam = fo|pen(file|
|00003740| 6e 61 6d 65 2c 22 61 22 | 29 3b 0d 09 09 69 66 20 |name,"a"|);...if |
|00003750| 28 73 74 72 65 61 6d 20 | 3d 3d 20 4e 55 4c 4c 29 |(stream |== NULL)|
|00003760| 0d 09 09 09 50 72 69 6e | 74 66 45 78 69 74 28 22 |....Prin|tfExit("|
|00003770| 4f 70 65 6e 43 61 6c 46 | 69 6c 65 57 72 69 74 65 |OpenCalF|ileWrite|
|00003780| 3a 20 63 61 6e 6e 6f 74 | 20 72 65 6f 70 65 6e 20 |: cannot| reopen |
|00003790| 66 69 6c 65 20 5c 22 25 | 73 5c 22 22 2c 66 69 6c |file \"%|s\"",fil|
|000037a0| 65 6e 61 6d 65 29 3b 0d | 09 09 72 65 74 75 72 6e |ename);.|..return|
|000037b0| 28 73 74 72 65 61 6d 29 | 3b 0d 09 7d 0d 09 0d 09 |(stream)|;..}....|
|000037c0| 2f 2a 20 54 72 79 20 74 | 68 65 20 50 72 65 66 65 |/* Try t|he Prefe|
|000037d0| 72 65 6e 63 65 73 20 66 | 6f 6c 64 65 72 20 2a 2f |rences f|older */|
|000037e0| 0d 09 4f 70 65 6e 50 72 | 65 66 65 72 65 6e 63 65 |..OpenPr|eference|
|000037f0| 73 46 6f 6c 64 65 72 28 | 29 3b 0d 09 73 74 72 65 |sFolder(|);..stre|
|00003800| 61 6d 20 3d 20 66 6f 70 | 65 6e 28 66 69 6c 65 6e |am = fop|en(filen|
|00003810| 61 6d 65 2c 22 72 22 29 | 3b 0d 09 43 6c 6f 73 65 |ame,"r")|;..Close|
|00003820| 50 72 65 66 65 72 65 6e | 63 65 73 46 6f 6c 64 65 |Preferen|cesFolde|
|00003830| 72 28 29 3b 0d 09 69 66 | 20 28 73 74 72 65 61 6d |r();..if| (stream|
|00003840| 20 21 3d 20 4e 55 4c 4c | 29 20 7b 0d 09 09 66 63 | != NULL|) {...fc|
|00003850| 6c 6f 73 65 28 73 74 72 | 65 61 6d 29 3b 0d 09 09 |lose(str|eam);...|
|00003860| 4f 70 65 6e 50 72 65 66 | 65 72 65 6e 63 65 73 46 |OpenPref|erencesF|
|00003870| 6f 6c 64 65 72 28 29 3b | 0d 09 09 73 74 72 65 61 |older();|...strea|
|00003880| 6d 20 3d 20 66 6f 70 65 | 6e 28 66 69 6c 65 6e 61 |m = fope|n(filena|
|00003890| 6d 65 2c 22 61 22 29 3b | 0d 09 09 43 6c 6f 73 65 |me,"a");|...Close|
|000038a0| 50 72 65 66 65 72 65 6e | 63 65 73 46 6f 6c 64 65 |Preferen|cesFolde|
|000038b0| 72 28 29 3b 0d 09 09 69 | 66 20 28 73 74 72 65 61 |r();...i|f (strea|
|000038c0| 6d 20 3d 3d 20 4e 55 4c | 4c 29 0d 09 09 09 50 72 |m == NUL|L)....Pr|
|000038d0| 69 6e 74 66 45 78 69 74 | 28 22 4f 70 65 6e 43 61 |intfExit|("OpenCa|
|000038e0| 6c 46 69 6c 65 57 72 69 | 74 65 3a 20 63 61 6e 6e |lFileWri|te: cann|
|000038f0| 6f 74 20 72 65 6f 70 65 | 6e 20 66 69 6c 65 20 5c |ot reope|n file \|
|00003900| 22 25 73 5c 22 20 69 6e | 20 50 72 65 66 65 72 65 |"%s\" in| Prefere|
|00003910| 6e 63 65 73 20 66 6f 6c | 64 65 72 22 0d 09 09 09 |nces fol|der"....|
|00003920| 09 2c 66 69 6c 65 6e 61 | 6d 65 29 3b 0d 09 09 72 |.,filena|me);...r|
|00003930| 65 74 75 72 6e 28 73 74 | 72 65 61 6d 29 3b 0d 09 |eturn(st|ream);..|
|00003940| 7d 0d 09 0d 09 2f 2a 20 | 43 72 65 61 74 65 20 69 |}..../* |Create i|
|00003950| 74 20 69 6e 20 74 68 65 | 20 50 72 65 66 65 72 65 |t in the| Prefere|
|00003960| 6e 63 65 73 20 66 6f 6c | 64 65 72 20 2a 2f 0d 09 |nces fol|der */..|
|00003970| 4f 70 65 6e 50 72 65 66 | 65 72 65 6e 63 65 73 46 |OpenPref|erencesF|
|00003980| 6f 6c 64 65 72 28 29 3b | 0d 09 73 74 72 65 61 6d |older();|..stream|
|00003990| 20 3d 20 66 6f 70 65 6e | 28 66 69 6c 65 6e 61 6d | = fopen|(filenam|
|000039a0| 65 2c 22 61 22 29 3b 0d | 09 43 6c 6f 73 65 50 72 |e,"a");.|.ClosePr|
|000039b0| 65 66 65 72 65 6e 63 65 | 73 46 6f 6c 64 65 72 28 |eference|sFolder(|
|000039c0| 29 3b 0d 09 69 66 20 28 | 73 74 72 65 61 6d 20 3d |);..if (|stream =|
|000039d0| 3d 20 4e 55 4c 4c 29 0d | 09 09 50 72 69 6e 74 66 |= NULL).|..Printf|
|000039e0| 45 78 69 74 28 22 4f 70 | 65 6e 43 61 6c 46 69 6c |Exit("Op|enCalFil|
|000039f0| 65 57 72 69 74 65 3a 20 | 63 61 6e 6e 6f 74 20 63 |eWrite: |cannot c|
|00003a00| 72 65 61 74 65 20 66 69 | 6c 65 20 5c 22 25 73 5c |reate fi|le \"%s\|
|00003a10| 22 20 69 6e 20 50 72 65 | 66 65 72 65 6e 63 65 73 |" in Pre|ferences|
|00003a20| 20 66 6f 6c 64 65 72 2e | 22 2c 66 69 6c 65 6e 61 | folder.|",filena|
|00003a30| 6d 65 29 3b 0d 09 72 65 | 74 75 72 6e 28 73 74 72 |me);..re|turn(str|
|00003a40| 65 61 6d 29 3b 0d 7d 0d | 0d 2f 2a 0d 52 4f 55 54 |eam);.}.|./*.ROUT|
|00003a50| 49 4e 45 3a 20 41 70 70 | 65 6e 64 44 65 73 63 72 |INE: App|endDescr|
|00003a60| 69 70 74 69 6f 6e 73 0d | 50 55 52 50 4f 53 45 3a |iptions.|PURPOSE:|
|00003a70| 0d 09 41 70 70 65 6e 64 | 73 20 74 68 65 20 73 65 |..Append|s the se|
|00003a80| 63 6f 6e 64 20 64 65 73 | 63 72 69 70 74 69 6f 6e |cond des|cription|
|00003a90| 73 20 61 72 72 61 79 20 | 6f 6e 74 6f 20 74 68 65 |s array |onto the|
|00003aa0| 20 65 6e 64 20 6f 66 20 | 74 68 65 20 66 69 72 73 | end of |the firs|
|00003ab0| 74 2c 0d 09 77 68 69 63 | 68 20 69 73 20 72 65 61 |t,..whic|h is rea|
|00003ac0| 6c 6c 6f 63 61 74 65 64 | 20 77 69 74 68 20 6d 6f |llocated| with mo|
|00003ad0| 72 65 20 73 70 61 63 65 | 2e 0d 09 0d 09 54 68 65 |re space|.....The|
|00003ae0| 20 73 6f 75 72 63 65 20 | 61 72 72 61 79 20 69 73 | source |array is|
|00003af0| 20 6e 6f 74 20 66 72 65 | 65 64 3b 20 74 68 65 20 | not fre|ed; the |
|00003b00| 63 61 6c 6c 65 72 20 73 | 68 6f 75 6c 64 20 64 6f |caller s|hould do|
|00003b10| 20 74 68 61 74 2e 0d 2a | 2f 0d 76 6f 69 64 20 41 | that..*|/.void A|
|00003b20| 70 70 65 6e 64 44 65 73 | 63 72 69 70 74 69 6f 6e |ppendDes|cription|
|00003b30| 73 28 44 65 73 63 72 69 | 70 74 69 6f 6e 20 2a 2a |s(Descri|ption **|
|00003b40| 64 2c 44 65 73 63 72 69 | 70 74 69 6f 6e 20 2a 73 |d,Descri|ption *s|
|00003b50| 29 0d 7b 0d 09 44 65 73 | 63 72 69 70 74 69 6f 6e |).{..Des|cription|
|00003b60| 20 2a 64 54 65 6d 70 3b | 0d 09 6c 6f 6e 67 20 6e | *dTemp;|..long n|
|00003b70| 31 2c 20 6e 32 2c 20 6e | 3b 0d 09 0d 09 6e 31 20 |1, n2, n|;....n1 |
|00003b80| 3d 20 4e 75 6d 62 65 72 | 4f 66 44 65 73 63 72 69 |= Number|OfDescri|
|00003b90| 70 74 69 6f 6e 73 28 2a | 64 29 3b 0d 09 6e 32 20 |ptions(*|d);..n2 |
|00003ba0| 3d 20 4e 75 6d 62 65 72 | 4f 66 44 65 73 63 72 69 |= Number|OfDescri|
|00003bb0| 70 74 69 6f 6e 73 28 73 | 29 3b 0d 09 6e 20 3d 20 |ptions(s|);..n = |
|00003bc0| 6e 31 2b 6e 32 3b 0d 09 | 64 54 65 6d 70 20 3d 20 |n1+n2;..|dTemp = |
|00003bd0| 41 6c 6c 6f 63 61 74 65 | 44 65 73 63 72 69 70 74 |Allocate|Descript|
|00003be0| 69 6f 6e 73 28 6e 29 3b | 0d 09 43 6f 70 79 44 65 |ions(n);|..CopyDe|
|00003bf0| 73 63 72 69 70 74 69 6f | 6e 73 28 64 54 65 6d 70 |scriptio|ns(dTemp|
|00003c00| 2c 2a 64 29 3b 0d 09 43 | 6f 70 79 44 65 73 63 72 |,*d);..C|opyDescr|
|00003c10| 69 70 74 69 6f 6e 73 28 | 64 54 65 6d 70 2b 6e 31 |iptions(|dTemp+n1|
|00003c20| 2c 73 29 3b 0d 09 46 72 | 65 65 44 65 73 63 72 69 |,s);..Fr|eeDescri|
|00003c30| 70 74 69 6f 6e 73 28 2a | 64 29 3b 0d 09 2a 64 3d |ptions(*|d);..*d=|
|00003c40| 64 54 65 6d 70 3b 0d 7d | 0d 0d 2f 2a 0d 52 4f 55 |dTemp;.}|../*.ROU|
|00003c50| 54 49 4e 45 3a 20 43 6f | 70 79 44 65 73 63 72 69 |TINE: Co|pyDescri|
|00003c60| 70 74 69 6f 6e 73 0d 50 | 55 52 50 4f 53 45 3a 0d |ptions.P|URPOSE:.|
|00003c70| 09 43 6f 70 79 20 6f 6e | 65 20 6e 75 6c 6c 2d 74 |.Copy on|e null-t|
|00003c80| 65 72 6d 69 6e 61 74 65 | 64 20 61 72 72 61 79 20 |erminate|d array |
|00003c90| 6f 66 20 64 65 73 63 72 | 69 70 74 69 6f 6e 73 20 |of descr|iptions |
|00003ca0| 74 6f 20 61 6e 6f 74 68 | 65 72 2c 20 77 68 69 63 |to anoth|er, whic|
|00003cb0| 68 20 69 73 20 61 73 73 | 75 6d 65 64 20 74 6f 0d |h is ass|umed to.|
|00003cc0| 09 62 65 20 62 69 67 20 | 65 6e 6f 75 67 68 2e 0d |.be big |enough..|
|00003cd0| 2a 2f 0d 76 6f 69 64 20 | 43 6f 70 79 44 65 73 63 |*/.void |CopyDesc|
|00003ce0| 72 69 70 74 69 6f 6e 73 | 28 44 65 73 63 72 69 70 |riptions|(Descrip|
|00003cf0| 74 69 6f 6e 20 2a 64 2c | 44 65 73 63 72 69 70 74 |tion *d,|Descript|
|00003d00| 69 6f 6e 20 2a 73 29 0d | 7b 0d 09 6c 6f 6e 67 20 |ion *s).|{..long |
|00003d10| 69 20 3d 20 30 3b 0d 09 | 0d 09 77 68 69 6c 65 20 |i = 0;..|..while |
|00003d20| 28 20 21 49 73 4e 75 6c | 6c 44 65 73 63 72 69 70 |( !IsNul|lDescrip|
|00003d30| 74 69 6f 6e 28 73 5b 69 | 5d 29 20 29 20 7b 0d 09 |tion(s[i|]) ) {..|
|00003d40| 09 64 5b 69 5d 3d 73 5b | 69 5d 3b 0d 09 09 69 2b |.d[i]=s[|i];...i+|
|00003d50| 2b 3b 0d 09 7d 0d 09 64 | 5b 69 5d 3d 4e 75 6c 6c |+;..}..d|[i]=Null|
|00003d60| 44 65 73 63 72 69 70 74 | 69 6f 6e 28 29 3b 0d 7d |Descript|ion();.}|
|00003d70| 0d 0d 2f 2a 0d 52 4f 55 | 54 49 4e 45 3a 20 41 6c |../*.ROU|TINE: Al|
|00003d80| 6c 6f 63 61 74 65 44 65 | 73 63 72 69 70 74 69 6f |locateDe|scriptio|
|00003d90| 6e 73 0d 50 55 52 50 4f | 53 45 3a 0d 09 41 6c 6c |ns.PURPO|SE:..All|
|00003da0| 6f 63 61 74 65 20 73 70 | 61 63 65 20 66 6f 72 20 |ocate sp|ace for |
|00003db0| 76 61 72 69 61 62 6c 65 | 20 64 65 73 63 72 69 70 |variable| descrip|
|00003dc0| 74 69 6f 6e 73 2e 0d 09 | 41 64 64 73 20 6f 6e 65 |tions...|Adds one|
|00003dd0| 20 74 6f 20 74 68 65 20 | 70 61 73 73 65 64 20 73 | to the |passed s|
|00003de0| 69 7a 65 20 74 6f 20 68 | 6f 6c 64 20 74 68 65 20 |ize to h|old the |
|00003df0| 6e 75 6c 6c 20 64 65 73 | 63 72 69 70 74 6f 72 2e |null des|criptor.|
|00003e00| 0d 09 4e 75 6c 6c 73 20 | 74 68 65 20 66 69 72 73 |..Nulls |the firs|
|00003e10| 74 20 65 6c 65 6d 65 6e | 74 2e 0d 2a 2f 0d 44 65 |t elemen|t..*/.De|
|00003e20| 73 63 72 69 70 74 69 6f | 6e 20 2a 41 6c 6c 6f 63 |scriptio|n *Alloc|
|00003e30| 61 74 65 44 65 73 63 72 | 69 70 74 69 6f 6e 73 28 |ateDescr|iptions(|
|00003e40| 6c 6f 6e 67 20 6e 29 0d | 7b 0d 09 44 65 73 63 72 |long n).|{..Descr|
|00003e50| 69 70 74 69 6f 6e 20 2a | 64 3b 0d 0d 09 64 20 3d |iption *|d;...d =|
|00003e60| 20 63 61 6c 6c 6f 63 28 | 6e 2b 31 2c 73 69 7a 65 | calloc(|n+1,size|
|00003e70| 6f 66 28 44 65 73 63 72 | 69 70 74 69 6f 6e 29 29 |of(Descr|iption))|
|00003e80| 3b 0d 09 69 66 20 28 64 | 20 3d 3d 20 4e 55 4c 4c |;..if (d| == NULL|
|00003e90| 29 20 7b 0d 09 09 50 72 | 69 6e 74 66 45 78 69 74 |) {...Pr|intfExit|
|00003ea0| 28 22 41 6c 6c 6f 63 61 | 74 65 44 65 73 63 72 69 |("Alloca|teDescri|
|00003eb0| 70 74 69 6f 6e 3a 20 6d | 65 6d 6f 72 79 20 61 6c |ption: m|emory al|
|00003ec0| 6c 6f 63 61 74 69 6f 6e | 20 66 61 69 6c 75 72 65 |location| failure|
|00003ed0| 2e 22 29 3b 0d 09 7d 0d | 09 64 5b 30 5d 3d 4e 75 |.");..}.|.d[0]=Nu|
|00003ee0| 6c 6c 44 65 73 63 72 69 | 70 74 69 6f 6e 28 29 3b |llDescri|ption();|
|00003ef0| 0d 09 72 65 74 75 72 6e | 28 64 29 3b 0d 7d 0d 0d |..return|(d);.}..|
|00003f00| 0d 2f 2a 0d 52 4f 55 54 | 49 4e 45 3a 20 46 72 65 |./*.ROUT|INE: Fre|
|00003f10| 65 44 65 73 63 72 69 70 | 74 69 6f 6e 73 0d 50 55 |eDescrip|tions.PU|
|00003f20| 52 50 4f 53 45 3a 0d 09 | 46 72 65 65 20 74 68 65 |RPOSE:..|Free the|
|00003f30| 20 64 65 73 63 72 69 70 | 74 69 6f 6e 20 73 70 61 | descrip|tion spa|
|00003f40| 63 65 2e 20 20 44 6f 65 | 73 20 6e 6f 74 20 61 66 |ce. Doe|s not af|
|00003f50| 66 65 63 74 20 74 68 65 | 20 64 65 73 63 72 69 62 |fect the| describ|
|00003f60| 65 64 20 76 61 72 69 61 | 62 6c 65 73 0d 09 74 68 |ed varia|bles..th|
|00003f70| 65 6d 73 65 6c 76 65 73 | 2e 0d 2a 2f 0d 76 6f 69 |emselves|..*/.voi|
|00003f80| 64 20 46 72 65 65 44 65 | 73 63 72 69 70 74 69 6f |d FreeDe|scriptio|
|00003f90| 6e 73 28 44 65 73 63 72 | 69 70 74 69 6f 6e 20 2a |ns(Descr|iption *|
|00003fa0| 64 29 0d 7b 0d 09 66 72 | 65 65 28 64 29 3b 09 0d |d).{..fr|ee(d);..|
|00003fb0| 7d 0d 0d 2f 2a 0d 52 4f | 55 54 49 4e 45 3a 20 4e |}../*.RO|UTINE: N|
|00003fc0| 75 6d 62 65 72 4f 66 44 | 65 73 63 72 69 70 74 69 |umberOfD|escripti|
|00003fd0| 6f 6e 73 0d 50 55 52 50 | 4f 53 45 3a 0d 09 46 69 |ons.PURP|OSE:..Fi|
|00003fe0| 6e 64 20 74 68 65 20 73 | 69 7a 65 20 6f 66 20 61 |nd the s|ize of a|
|00003ff0| 6e 20 61 72 72 61 79 20 | 6f 66 20 64 65 73 63 72 |n array |of descr|
|00004000| 69 70 74 69 6f 6e 73 2e | 0d 09 0d 09 44 6f 65 73 |iptions.|....Does|
|00004010| 20 6e 6f 74 20 63 6f 75 | 6e 74 20 74 68 65 20 74 | not cou|nt the t|
|00004020| 72 61 69 6c 69 6e 67 20 | 6e 75 6c 6c 20 64 65 73 |railing |null des|
|00004030| 63 72 69 70 74 69 6f 6e | 2e 0d 2a 2f 0d 6c 6f 6e |cription|..*/.lon|
|00004040| 67 20 4e 75 6d 62 65 72 | 4f 66 44 65 73 63 72 69 |g Number|OfDescri|
|00004050| 70 74 69 6f 6e 73 28 44 | 65 73 63 72 69 70 74 69 |ptions(D|escripti|
|00004060| 6f 6e 20 2a 64 29 0d 7b | 0d 09 6c 6f 6e 67 20 69 |on *d).{|..long i|
|00004070| 3d 30 3b 0d 09 0d 09 77 | 68 69 6c 65 20 28 20 21 |=0;....w|hile ( !|
|00004080| 49 73 4e 75 6c 6c 44 65 | 73 63 72 69 70 74 69 6f |IsNullDe|scriptio|
|00004090| 6e 28 64 5b 69 5d 29 20 | 29 20 69 2b 2b 3b 0d 09 |n(d[i]) |) i++;..|
|000040a0| 72 65 74 75 72 6e 28 69 | 29 3b 0d 7d 0d 0d 2f 2a |return(i|);.}../*|
|000040b0| 0d 52 4f 55 54 49 4e 45 | 3a 20 4e 75 6c 6c 44 65 |.ROUTINE|: NullDe|
|000040c0| 73 63 72 69 70 74 69 6f | 6e 0d 50 55 52 50 4f 53 |scriptio|n.PURPOS|
|000040d0| 45 3a 0d 09 52 65 74 75 | 72 6e 73 20 61 20 6e 75 |E:..Retu|rns a nu|
|000040e0| 6c 6c 20 64 65 73 63 72 | 69 70 74 69 6f 6e 2e 0d |ll descr|iption..|
|000040f0| 09 53 74 61 6e 64 61 72 | 64 20 43 20 73 70 65 63 |.Standar|d C spec|
|00004100| 69 66 69 65 73 20 74 68 | 61 74 20 73 74 61 74 69 |ifies th|at stati|
|00004110| 63 20 76 61 72 69 61 62 | 6c 65 73 20 61 72 65 20 |c variab|les are |
|00004120| 69 6e 69 74 69 61 6c 69 | 7a 65 64 20 74 6f 20 7a |initiali|zed to z|
|00004130| 65 72 6f 2e 0d 2a 2f 0d | 44 65 73 63 72 69 70 74 |ero..*/.|Descript|
|00004140| 69 6f 6e 20 4e 75 6c 6c | 44 65 73 63 72 69 70 74 |ion Null|Descript|
|00004150| 69 6f 6e 28 76 6f 69 64 | 29 0d 7b 0d 09 73 74 61 |ion(void|).{..sta|
|00004160| 74 69 63 20 44 65 73 63 | 72 69 70 74 69 6f 6e 20 |tic Desc|ription |
|00004170| 64 3b 0d 09 72 65 74 75 | 72 6e 20 64 3b 0d 7d 0d |d;..retu|rn d;.}.|
|00004180| 0d 44 65 73 63 72 69 70 | 74 69 6f 6e 20 44 65 73 |.Descrip|tion Des|
|00004190| 63 72 69 62 65 28 73 68 | 6f 72 74 20 74 79 70 65 |cribe(sh|ort type|
|000041a0| 2c 76 6f 69 64 20 2a 70 | 74 72 2c 63 68 61 72 20 |,void *p|tr,char |
|000041b0| 2a 6e 61 6d 65 2c 63 6f | 6e 73 74 20 63 68 61 72 |*name,co|nst char|
|000041c0| 20 2a 63 6f 6d 6d 65 6e | 74 29 0d 7b 0d 09 73 74 | *commen|t).{..st|
|000041d0| 61 74 69 63 20 44 65 73 | 63 72 69 70 74 69 6f 6e |atic Des|cription|
|000041e0| 20 76 61 72 3b 0d 0d 09 | 76 61 72 3d 44 65 73 63 | var;...|var=Desc|
|000041f0| 72 69 62 65 41 72 72 61 | 79 28 74 79 70 65 2c 70 |ribeArra|y(type,p|
|00004200| 74 72 2c 6e 61 6d 65 2c | 63 6f 6d 6d 65 6e 74 2c |tr,name,|comment,|
|00004210| 30 4c 29 3b 0d 09 69 66 | 28 49 73 50 74 72 28 74 |0L);..if|(IsPtr(t|
|00004220| 79 70 65 29 29 20 76 61 | 72 2e 73 69 7a 65 64 4f |ype)) va|r.sizedO|
|00004230| 6e 63 65 3d 76 61 72 2e | 73 69 7a 65 64 3d 30 3b |nce=var.|sized=0;|
|00004240| 0d 09 72 65 74 75 72 6e | 20 76 61 72 3b 0d 7d 0d |..return| var;.}.|
|00004250| 0d 44 65 73 63 72 69 70 | 74 69 6f 6e 20 44 65 73 |.Descrip|tion Des|
|00004260| 63 72 69 62 65 41 72 72 | 61 79 28 73 68 6f 72 74 |cribeArr|ay(short|
|00004270| 20 74 79 70 65 2c 76 6f | 69 64 20 2a 70 74 72 2c | type,vo|id *ptr,|
|00004280| 63 68 61 72 20 2a 6e 61 | 6d 65 2c 63 6f 6e 73 74 |char *na|me,const|
|00004290| 20 63 68 61 72 20 2a 63 | 6f 6d 6d 65 6e 74 2c 2e | char *c|omment,.|
|000042a0| 2e 2e 29 0d 2f 2a 20 57 | 41 52 4e 49 4e 47 3a 20 |..)./* W|ARNING: |
|000042b0| 74 68 65 20 64 69 6d 65 | 6e 73 69 6f 6e 73 20 6d |the dime|nsions m|
|000042c0| 75 73 74 20 62 65 20 28 | 6c 6f 6e 67 29 20 61 6e |ust be (|long) an|
|000042d0| 64 20 74 68 65 20 6c 61 | 73 74 20 61 72 67 75 6d |d the la|st argum|
|000042e0| 65 6e 74 20 6d 75 73 74 | 20 62 65 20 30 4c 2e 20 |ent must| be 0L. |
|000042f0| 2a 2f 0d 7b 0d 09 76 61 | 5f 6c 69 73 74 20 61 72 |*/.{..va|_list ar|
|00004300| 67 73 3b 0d 09 73 74 61 | 74 69 63 20 44 65 73 63 |gs;..sta|tic Desc|
|00004310| 72 69 70 74 69 6f 6e 20 | 76 61 72 3b 0d 09 69 6e |ription |var;..in|
|00004320| 74 20 69 3b 0d 09 6c 6f | 6e 67 20 64 69 6d 3b 0d |t i;..lo|ng dim;.|
|00004330| 09 0d 09 76 61 72 2e 6e | 61 6d 65 3d 6e 61 6d 65 |...var.n|ame=name|
|00004340| 3b 0d 09 76 61 72 2e 70 | 74 72 3d 70 74 72 3b 0d |;..var.p|tr=ptr;.|
|00004350| 09 76 61 72 2e 74 79 70 | 65 3d 74 79 70 65 3b 0d |.var.typ|e=type;.|
|00004360| 09 76 61 72 2e 66 69 72 | 73 74 45 6c 65 6d 65 6e |.var.fir|stElemen|
|00004370| 74 3d 30 3b 0d 09 66 6f | 72 28 69 3d 30 3b 69 3c |t=0;..fo|r(i=0;i<|
|00004380| 41 53 53 49 47 4e 5f 44 | 49 4d 53 3b 69 2b 2b 29 |ASSIGN_D|IMS;i++)|
|00004390| 76 61 72 2e 64 69 6d 5b | 69 5d 3d 30 3b 0d 09 76 |var.dim[|i]=0;..v|
|000043a0| 61 72 2e 63 6f 6d 6d 65 | 6e 74 3d 63 6f 6d 6d 65 |ar.comme|nt=comme|
|000043b0| 6e 74 3b 0d 09 76 61 5f | 73 74 61 72 74 28 61 72 |nt;..va_|start(ar|
|000043c0| 67 73 2c 63 6f 6d 6d 65 | 6e 74 29 3b 0d 09 66 6f |gs,comme|nt);..fo|
|000043d0| 72 28 69 3d 30 3b 3b 69 | 2b 2b 29 7b 0d 09 09 64 |r(i=0;;i|++){...d|
|000043e0| 69 6d 3d 76 61 5f 61 72 | 67 28 61 72 67 73 2c 6c |im=va_ar|g(args,l|
|000043f0| 6f 6e 67 29 3b 0d 09 09 | 69 66 28 64 69 6d 3d 3d |ong);...|if(dim==|
|00004400| 30 29 62 72 65 61 6b 3b | 0d 09 09 69 66 28 69 3e |0)break;|...if(i>|
|00004410| 3d 41 53 53 49 47 4e 5f | 44 49 4d 53 29 50 72 69 |=ASSIGN_|DIMS)Pri|
|00004420| 6e 74 66 45 78 69 74 28 | 22 44 65 73 63 72 69 62 |ntfExit(|"Describ|
|00004430| 65 2f 41 72 72 61 79 2f | 46 69 72 73 74 4c 61 73 |e/Array/|FirstLas|
|00004440| 74 3a 20 22 0d 09 09 09 | 22 74 6f 6f 20 6d 61 6e |t: "....|"too man|
|00004450| 79 20 64 69 6d 65 6e 73 | 69 6f 6e 73 20 28 6f 72 |y dimens|ions (or|
|00004460| 20 6d 69 73 73 69 6e 67 | 20 66 69 6e 61 6c 20 30 | missing| final 0|
|00004470| 4c 29 20 66 6f 72 20 5c | 22 25 73 5c 22 2e 5c 6e |L) for \|"%s\".\n|
|00004480| 22 2c 76 61 72 2e 6e 61 | 6d 65 29 3b 0d 09 09 76 |",var.na|me);...v|
|00004490| 61 72 2e 64 69 6d 5b 69 | 5d 3d 64 69 6d 3b 0d 09 |ar.dim[i|]=dim;..|
|000044a0| 7d 0d 09 76 61 5f 65 6e | 64 28 61 72 67 73 29 3b |}..va_en|d(args);|
|000044b0| 0d 09 69 66 28 76 61 72 | 2e 74 79 70 65 21 3d 30 |..if(var|.type!=0|
|000044c0| 20 26 26 20 76 61 72 2e | 70 74 72 3d 3d 4e 55 4c | && var.|ptr==NUL|
|000044d0| 4c 29 0d 09 09 50 72 69 | 6e 74 66 45 78 69 74 28 |L)...Pri|ntfExit(|
|000044e0| 22 44 65 73 63 72 69 62 | 65 2f 41 72 72 61 79 2f |"Describ|e/Array/|
|000044f0| 46 69 72 73 74 4c 61 73 | 74 3a 20 5c 22 25 73 5c |FirstLas|t: \"%s\|
|00004500| 22 20 70 74 72 20 69 73 | 20 4e 55 4c 4c 2e 5c 6e |" ptr is| NULL.\n|
|00004510| 22 2c 76 61 72 2e 6e 61 | 6d 65 29 3b 0d 09 2f 2a |",var.na|me);../*|
|00004520| 20 4e 6f 74 65 3a 20 77 | 65 27 72 65 20 63 6c 65 | Note: w|e're cle|
|00004530| 61 72 69 6e 67 20 74 68 | 65 20 6d 61 6c 6c 6f 63 |aring th|e malloc|
|00004540| 65 64 20 66 6c 61 67 2c | 20 77 68 69 63 68 20 69 |ed flag,| which i|
|00004550| 73 20 74 68 65 20 6f 6e | 6c 79 20 73 61 66 65 20 |s the on|ly safe |
|00004560| 61 73 73 75 6d 70 74 69 | 6f 6e 2e 20 2a 2f 0d 09 |assumpti|on. */..|
|00004570| 76 61 72 2e 6d 61 6c 6c | 6f 63 65 64 3d 30 3b 0d |var.mall|oced=0;.|
|00004580| 09 76 61 72 2e 73 69 7a | 65 64 4f 6e 63 65 3d 76 |.var.siz|edOnce=v|
|00004590| 61 72 2e 73 69 7a 65 64 | 3d 31 3b 0d 09 72 65 74 |ar.sized|=1;..ret|
|000045a0| 75 72 6e 20 76 61 72 3b | 0d 7d 0d 44 65 73 63 72 |urn var;|.}.Descr|
|000045b0| 69 70 74 69 6f 6e 20 44 | 65 73 63 72 69 62 65 46 |iption D|escribeF|
|000045c0| 69 72 73 74 4c 61 73 74 | 28 73 68 6f 72 74 20 74 |irstLast|(short t|
|000045d0| 79 70 65 2c 76 6f 69 64 | 20 2a 70 74 72 2c 63 68 |ype,void| *ptr,ch|
|000045e0| 61 72 20 2a 6e 61 6d 65 | 0d 09 2c 63 6f 6e 73 74 |ar *name|..,const|
|000045f0| 20 63 68 61 72 20 2a 63 | 6f 6d 6d 65 6e 74 2c 6c | char *c|omment,l|
|00004600| 6f 6e 67 20 66 69 72 73 | 74 45 6c 65 6d 65 6e 74 |ong firs|tElement|
|00004610| 2c 6c 6f 6e 67 20 6c 61 | 73 74 45 6c 65 6d 65 6e |,long la|stElemen|
|00004620| 74 29 0d 7b 0d 09 73 74 | 61 74 69 63 20 44 65 73 |t).{..st|atic Des|
|00004630| 63 72 69 70 74 69 6f 6e | 20 76 61 72 3b 0d 09 6c |cription| var;..l|
|00004640| 6f 6e 67 20 64 69 6d 3b | 0d 09 0d 09 64 69 6d 3d |ong dim;|....dim=|
|00004650| 31 2b 6c 61 73 74 45 6c | 65 6d 65 6e 74 2d 66 69 |1+lastEl|ement-fi|
|00004660| 72 73 74 45 6c 65 6d 65 | 6e 74 3b 0d 09 76 61 72 |rstEleme|nt;..var|
|00004670| 3d 44 65 73 63 72 69 62 | 65 41 72 72 61 79 28 74 |=Describ|eArray(t|
|00004680| 79 70 65 2c 70 74 72 2c | 6e 61 6d 65 2c 63 6f 6d |ype,ptr,|name,com|
|00004690| 6d 65 6e 74 2c 64 69 6d | 2c 30 4c 29 3b 0d 09 76 |ment,dim|,0L);..v|
|000046a0| 61 72 2e 66 69 72 73 74 | 45 6c 65 6d 65 6e 74 3d |ar.first|Element=|
|000046b0| 66 69 72 73 74 45 6c 65 | 6d 65 6e 74 3b 0d 09 72 |firstEle|ment;..r|
|000046c0| 65 74 75 72 6e 20 76 61 | 72 3b 0d 7d 0d 44 65 73 |eturn va|r;.}.Des|
|000046d0| 63 72 69 70 74 69 6f 6e | 20 53 65 74 41 56 61 72 |cription| SetAVar|
|000046e0| 69 61 62 6c 65 28 73 68 | 6f 72 74 20 74 79 70 65 |iable(sh|ort type|
|000046f0| 2c 76 6f 69 64 20 2a 70 | 74 72 2c 63 68 61 72 20 |,void *p|tr,char |
|00004700| 2a 6e 61 6d 65 2c 75 6e | 73 69 67 6e 65 64 20 6c |*name,un|signed l|
|00004710| 6f 6e 67 20 64 69 6d 0d | 09 2c 63 6f 6e 73 74 20 |ong dim.|.,const |
|00004720| 63 68 61 72 20 2a 63 6f | 6d 6d 65 6e 74 29 0d 2f |char *co|mment)./|
|00004730| 2a 20 4f 6c 64 20 73 74 | 79 6c 65 2c 20 72 65 74 |* Old st|yle, ret|
|00004740| 61 69 6e 65 64 20 73 6f | 6c 65 6c 79 20 66 6f 72 |ained so|lely for|
|00004750| 20 63 6f 6d 70 61 74 69 | 62 69 6c 69 74 79 20 2a | compati|bility *|
|00004760| 2f 0d 7b 0d 09 69 66 28 | 64 69 6d 3d 3d 30 29 72 |/.{..if(|dim==0)r|
|00004770| 65 74 75 72 6e 20 44 65 | 73 63 72 69 62 65 28 74 |eturn De|scribe(t|
|00004780| 79 70 65 2c 70 74 72 2c | 6e 61 6d 65 2c 63 6f 6d |ype,ptr,|name,com|
|00004790| 6d 65 6e 74 29 3b 0d 09 | 65 6c 73 65 20 72 65 74 |ment);..|else ret|
|000047a0| 75 72 6e 20 44 65 73 63 | 72 69 62 65 41 72 72 61 |urn Desc|ribeArra|
|000047b0| 79 28 74 79 70 65 2c 70 | 74 72 2c 6e 61 6d 65 2c |y(type,p|tr,name,|
|000047c0| 63 6f 6d 6d 65 6e 74 2c | 64 69 6d 2c 30 4c 29 3b |comment,|dim,0L);|
|000047d0| 0d 7d 0d 69 6e 74 20 41 | 6c 6c 6f 63 61 74 65 44 |.}.int A|llocateD|
|000047e0| 65 73 63 72 69 62 65 64 | 50 74 72 56 61 72 73 28 |escribed|PtrVars(|
|000047f0| 44 65 73 63 72 69 70 74 | 69 6f 6e 20 64 65 73 63 |Descript|ion desc|
|00004800| 72 69 70 74 69 6f 6e 5b | 5d 2c 63 6f 6e 73 74 20 |ription[|],const |
|00004810| 63 68 61 72 20 2a 68 65 | 72 65 2c 73 68 6f 72 74 |char *he|re,short|
|00004820| 20 66 6c 61 67 73 29 0d | 7b 0d 09 72 65 67 69 73 | flags).|{..regis|
|00004830| 74 65 72 20 44 65 73 63 | 72 69 70 74 69 6f 6e 20 |ter Desc|ription |
|00004840| 2a 64 3b 0d 09 0d 09 66 | 6f 72 28 64 3d 64 65 73 |*d;....f|or(d=des|
|00004850| 63 72 69 70 74 69 6f 6e | 3b 64 2d 3e 74 79 70 65 |cription|;d->type|
|00004860| 21 3d 30 3b 64 2b 2b 29 | 7b 0d 09 09 69 66 28 49 |!=0;d++)|{...if(I|
|00004870| 73 50 74 72 28 64 2d 3e | 74 79 70 65 29 20 26 26 |sPtr(d->|type) &&|
|00004880| 20 64 2d 3e 73 69 7a 65 | 64 4f 6e 63 65 20 26 26 | d->size|dOnce &&|
|00004890| 20 21 64 2d 3e 6d 61 6c | 6c 6f 63 65 64 29 7b 0d | !d->mal|loced){.|
|000048a0| 09 09 09 61 73 73 65 72 | 74 28 64 2d 3e 70 74 72 |...asser|t(d->ptr|
|000048b0| 21 3d 4e 55 4c 4c 29 3b | 0d 09 09 09 2a 28 76 6f |!=NULL);|....*(vo|
|000048c0| 69 64 20 2a 2a 29 64 2d | 3e 70 74 72 3d 6d 61 6c |id **)d-|>ptr=mal|
|000048d0| 6c 6f 63 28 45 6c 65 6d | 65 6e 74 73 28 64 29 2a |loc(Elem|ents(d)*|
|000048e0| 74 79 70 65 53 69 7a 65 | 5b 64 2d 3e 74 79 70 65 |typeSize|[d->type|
|000048f0| 5d 29 3b 0d 09 09 09 69 | 66 28 2a 28 76 6f 69 64 |]);....i|f(*(void|
|00004900| 20 2a 2a 29 64 2d 3e 70 | 74 72 3d 3d 4e 55 4c 4c | **)d->p|tr==NULL|
|00004910| 29 7b 0d 09 09 09 09 69 | 66 28 50 52 49 4e 54 46 |){.....i|f(PRINTF|
|00004920| 5f 45 58 49 54 29 50 72 | 69 6e 74 66 45 78 69 74 |_EXIT)Pr|intfExit|
|00004930| 28 22 25 73 3a 20 6e 6f | 20 72 6f 6f 6d 20 66 6f |("%s: no| room fo|
|00004940| 72 20 25 6c 64 20 62 79 | 74 65 73 20 66 6f 72 20 |r %ld by|tes for |
|00004950| 5c 22 25 73 5c 22 2e 5c | 6e 22 0d 09 09 09 09 09 |\"%s\".\|n"......|
|00004960| 2c 68 65 72 65 2c 45 6c | 65 6d 65 6e 74 73 28 64 |,here,El|ements(d|
|00004970| 29 2a 74 79 70 65 53 69 | 7a 65 5b 64 2d 3e 74 79 |)*typeSi|ze[d->ty|
|00004980| 70 65 5d 2c 64 2d 3e 6e | 61 6d 65 29 3b 0d 09 09 |pe],d->n|ame);...|
|00004990| 09 09 65 6c 73 65 20 72 | 65 74 75 72 6e 20 61 73 |..else r|eturn as|
|000049a0| 73 69 67 6e 4d 65 6d 6f | 72 79 45 72 72 6f 72 3b |signMemo|ryError;|
|000049b0| 0d 09 09 09 7d 0d 09 09 | 09 64 2d 3e 73 69 7a 65 |....}...|.d->size|
|000049c0| 64 3d 64 2d 3e 6d 61 6c | 6c 6f 63 65 64 3d 31 3b |d=d->mal|loced=1;|
|000049d0| 0d 09 09 09 49 6e 69 74 | 69 61 6c 69 7a 65 41 44 |....Init|ializeAD|
|000049e0| 65 73 63 72 69 62 65 64 | 56 61 72 28 64 2c 66 6c |escribed|Var(d,fl|
|000049f0| 61 67 73 29 3b 0d 09 09 | 7d 0d 09 7d 0d 09 72 65 |ags);...|}..}..re|
|00004a00| 74 75 72 6e 20 30 3b 0d | 7d 0d 0d 6c 6f 6e 67 20 |turn 0;.|}..long |
|00004a10| 43 68 65 63 6b 44 65 73 | 63 72 69 70 74 69 6f 6e |CheckDes|cription|
|00004a20| 73 28 44 65 73 63 72 69 | 70 74 69 6f 6e 20 64 5b |s(Descri|ption d[|
|00004a30| 5d 2c 63 6f 6e 73 74 20 | 63 68 61 72 20 2a 68 65 |],const |char *he|
|00004a40| 72 65 2c 73 68 6f 72 74 | 20 66 6c 61 67 73 29 0d |re,short| flags).|
|00004a50| 7b 0d 09 69 6e 74 20 65 | 72 72 6f 72 3b 0d 09 0d |{..int e|rror;...|
|00004a60| 09 69 66 28 66 6c 61 67 | 73 26 61 73 73 69 67 6e |.if(flag|s&assign|
|00004a70| 41 6c 72 65 61 64 79 43 | 68 65 63 6b 65 64 29 72 |AlreadyC|hecked)r|
|00004a80| 65 74 75 72 6e 20 30 3b | 0d 09 66 6f 72 28 3b 64 |eturn 0;|..for(;d|
|00004a90| 2d 3e 74 79 70 65 21 3d | 30 3b 64 2b 2b 29 7b 0d |->type!=|0;d++){.|
|00004aa0| 09 09 65 72 72 6f 72 3d | 43 68 65 63 6b 41 44 65 |..error=|CheckADe|
|00004ab0| 73 63 72 69 70 74 69 6f | 6e 28 64 2c 68 65 72 65 |scriptio|n(d,here|
|00004ac0| 2c 66 6c 61 67 73 29 3b | 0d 09 09 69 66 28 65 72 |,flags);|...if(er|
|00004ad0| 72 6f 72 29 72 65 74 75 | 72 6e 20 65 72 72 6f 72 |ror)retu|rn error|
|00004ae0| 3b 0d 09 7d 0d 09 72 65 | 74 75 72 6e 20 30 3b 0d |;..}..re|turn 0;.|
|00004af0| 7d 0d 0d 6c 6f 6e 67 20 | 43 68 65 63 6b 41 44 65 |}..long |CheckADe|
|00004b00| 73 63 72 69 70 74 69 6f | 6e 28 44 65 73 63 72 69 |scriptio|n(Descri|
|00004b10| 70 74 69 6f 6e 20 2a 64 | 2c 63 6f 6e 73 74 20 63 |ption *d|,const c|
|00004b20| 68 61 72 20 2a 68 65 72 | 65 2c 73 68 6f 72 74 20 |har *her|e,short |
|00004b30| 66 6c 61 67 73 29 0d 7b | 0d 09 63 68 61 72 20 2a |flags).{|..char *|
|00004b40| 73 2c 2a 73 4f 6b 3b 0d | 09 0d 09 69 66 28 66 6c |s,*sOk;.|...if(fl|
|00004b50| 61 67 73 26 61 73 73 69 | 67 6e 41 6c 72 65 61 64 |ags&assi|gnAlread|
|00004b60| 79 43 68 65 63 6b 65 64 | 29 72 65 74 75 72 6e 20 |yChecked|)return |
|00004b70| 30 3b 0d 09 69 66 28 64 | 2d 3e 74 79 70 65 3c 3d |0;..if(d|->type<=|
|00004b80| 30 20 7c 7c 20 64 2d 3e | 74 79 70 65 3e 3d 75 6e |0 || d->|type>=un|
|00004b90| 6b 6e 6f 77 6e 54 79 70 | 65 29 7b 0d 09 09 69 66 |knownTyp|e){...if|
|00004ba0| 28 50 52 49 4e 54 46 5f | 45 58 49 54 29 50 72 69 |(PRINTF_|EXIT)Pri|
|00004bb0| 6e 74 66 45 78 69 74 28 | 22 25 73 3a 20 5c 22 25 |ntfExit(|"%s: \"%|
|00004bc0| 73 5c 22 20 68 61 73 20 | 75 6e 6b 6e 6f 77 6e 20 |s\" has |unknown |
|00004bd0| 74 79 70 65 20 25 6c 64 | 2e 5c 6e 22 0d 09 09 09 |type %ld|.\n"....|
|00004be0| 2c 68 65 72 65 2c 64 2d | 3e 6e 61 6d 65 2c 28 6c |,here,d-|>name,(l|
|00004bf0| 6f 6e 67 29 64 2d 3e 74 | 79 70 65 29 3b 0d 09 09 |ong)d->t|ype);...|
|00004c00| 65 6c 73 65 20 72 65 74 | 75 72 6e 20 61 73 73 69 |else ret|urn assi|
|00004c10| 67 6e 56 61 72 69 61 62 | 6c 65 45 72 72 6f 72 3b |gnVariab|leError;|
|00004c20| 0d 09 7d 0d 09 69 66 28 | 21 49 73 50 74 72 28 64 |..}..if(|!IsPtr(d|
|00004c30| 2d 3e 74 79 70 65 29 20 | 26 26 20 64 2d 3e 70 74 |->type) |&& d->pt|
|00004c40| 72 3d 3d 4e 55 4c 4c 29 | 7b 0d 09 09 69 66 28 50 |r==NULL)|{...if(P|
|00004c50| 52 49 4e 54 46 5f 45 58 | 49 54 29 50 72 69 6e 74 |RINTF_EX|IT)Print|
|00004c60| 66 45 78 69 74 28 22 25 | 73 3a 20 5c 22 25 73 5c |fExit("%|s: \"%s\|
|00004c70| 22 20 70 74 72 20 69 73 | 20 4e 55 4c 4c 2e 5c 6e |" ptr is| NULL.\n|
|00004c80| 22 0d 09 09 09 2c 68 65 | 72 65 2c 64 2d 3e 6e 61 |"....,he|re,d->na|
|00004c90| 6d 65 29 3b 0d 09 09 65 | 6c 73 65 20 72 65 74 75 |me);...e|lse retu|
|00004ca0| 72 6e 20 61 73 73 69 67 | 6e 56 61 72 69 61 62 6c |rn assig|nVariabl|
|00004cb0| 65 45 72 72 6f 72 3b 0d | 09 7d 0d 09 2f 2a 20 53 |eError;.|.}../* S|
|00004cc0| 71 75 65 65 7a 65 20 61 | 6e 79 20 73 70 61 63 65 |queeze a|ny space|
|00004cd0| 20 6f 75 74 20 6f 66 20 | 74 68 65 20 6e 61 6d 65 | out of |the name|
|00004ce0| 20 2a 2f 0d 09 66 6f 72 | 28 73 3d 73 4f 6b 3d 64 | */..for|(s=sOk=d|
|00004cf0| 2d 3e 6e 61 6d 65 3b 2a | 73 21 3d 30 3b 73 2b 2b |->name;*|s!=0;s++|
|00004d00| 29 69 66 28 21 69 73 73 | 70 61 63 65 28 2a 73 29 |)if(!iss|pace(*s)|
|00004d10| 29 2a 73 4f 6b 2b 2b 3d | 2a 73 3b 0d 09 2a 73 4f |)*sOk++=|*s;..*sO|
|00004d20| 6b 3d 30 3b 0d 09 2f 2a | 20 43 68 65 63 6b 20 6e |k=0;../*| Check n|
|00004d30| 61 6d 65 27 73 20 73 79 | 6e 74 61 78 20 2a 2f 0d |ame's sy|ntax */.|
|00004d40| 09 73 3d 64 2d 3e 6e 61 | 6d 65 3b 0d 09 69 66 28 |.s=d->na|me;..if(|
|00004d50| 50 61 72 73 65 4e 61 6d | 65 28 26 73 29 20 7c 7c |ParseNam|e(&s) |||
|00004d60| 20 2a 73 21 3d 30 29 7b | 0d 09 09 69 66 28 50 52 | *s!=0){|...if(PR|
|00004d70| 49 4e 54 46 5f 45 58 49 | 54 29 50 72 69 6e 74 66 |INTF_EXI|T)Printf|
|00004d80| 45 78 69 74 28 22 25 73 | 3a 20 69 6c 6c 65 67 61 |Exit("%s|: illega|
|00004d90| 6c 20 6e 61 6d 65 20 5c | 22 25 73 5c 22 2e 5c 6e |l name \|"%s\".\n|
|00004da0| 22 0d 09 09 09 2c 68 65 | 72 65 2c 64 2d 3e 6e 61 |"....,he|re,d->na|
|00004db0| 6d 65 29 3b 0d 09 09 65 | 6c 73 65 20 72 65 74 75 |me);...e|lse retu|
|00004dc0| 72 6e 20 61 73 73 69 67 | 6e 56 61 72 69 61 62 6c |rn assig|nVariabl|
|00004dd0| 65 45 72 72 6f 72 3b 0d | 09 7d 0d 09 72 65 74 75 |eError;.|.}..retu|
|00004de0| 72 6e 20 30 3b 0d 7d 0d | 0d 69 6e 74 20 55 6e 65 |rn 0;.}.|.int Une|
|00004df0| 71 75 61 6c 44 65 73 63 | 72 69 62 65 64 56 61 72 |qualDesc|ribedVar|
|00004e00| 73 28 44 65 73 63 72 69 | 70 74 69 6f 6e 20 64 31 |s(Descri|ption d1|
|00004e10| 5b 5d 2c 44 65 73 63 72 | 69 70 74 69 6f 6e 20 64 |[],Descr|iption d|
|00004e20| 32 5b 5d 2c 73 68 6f 72 | 74 20 66 6c 61 67 73 29 |2[],shor|t flags)|
|00004e30| 0d 2f 2a 0d 43 6f 6d 70 | 61 72 65 73 20 74 68 65 |./*.Comp|ares the|
|00004e40| 20 64 61 74 61 20 70 6f | 69 6e 74 65 64 20 74 6f | data po|inted to|
|00004e50| 20 62 79 20 74 68 65 20 | 74 77 6f 20 44 65 73 63 | by the |two Desc|
|00004e60| 72 69 70 74 69 6f 6e 20 | 61 72 72 61 79 73 20 61 |ription |arrays a|
|00004e70| 6e 64 20 72 65 74 75 72 | 6e 73 0d 74 72 75 65 20 |nd retur|ns.true |
|00004e80| 69 66 20 74 68 65 20 73 | 74 72 75 63 74 73 20 61 |if the s|tructs a|
|00004e90| 72 65 20 6c 65 67 61 6c | 20 61 6e 64 20 74 68 65 |re legal| and the|
|00004ea0| 20 64 61 74 61 20 61 72 | 65 20 65 71 75 61 6c 2c | data ar|e equal,|
|00004eb0| 20 66 61 6c 73 65 20 6f | 74 68 65 72 77 69 73 65 | false o|therwise|
|00004ec0| 2e 0d 2a 2f 0d 7b 0d 09 | 69 6e 74 20 65 72 72 6f |..*/.{..|int erro|
|00004ed0| 72 3b 0d 09 0d 09 66 6f | 72 28 3b 64 31 2d 3e 74 |r;....fo|r(;d1->t|
|00004ee0| 79 70 65 21 3d 30 20 26 | 26 20 64 32 2d 3e 74 79 |ype!=0 &|& d2->ty|
|00004ef0| 70 65 21 3d 30 3b 64 31 | 2b 2b 2c 64 32 2b 2b 29 |pe!=0;d1|++,d2++)|
|00004f00| 7b 0d 09 09 65 72 72 6f | 72 3d 55 6e 65 71 75 61 |{...erro|r=Unequa|
|00004f10| 6c 44 65 73 63 72 69 62 | 65 64 56 61 72 50 61 69 |lDescrib|edVarPai|
|00004f20| 72 28 64 31 2c 64 32 2c | 66 6c 61 67 73 29 3b 0d |r(d1,d2,|flags);.|
|00004f30| 09 09 69 66 28 65 72 72 | 6f 72 29 72 65 74 75 72 |..if(err|or)retur|
|00004f40| 6e 20 65 72 72 6f 72 3b | 0d 09 7d 0d 09 72 65 74 |n error;|..}..ret|
|00004f50| 75 72 6e 20 30 3b 0d 7d | 0d 0d 69 6e 74 20 43 6f |urn 0;.}|..int Co|
|00004f60| 70 79 44 65 73 63 72 69 | 62 65 64 56 61 72 73 28 |pyDescri|bedVars(|
|00004f70| 44 65 73 63 72 69 70 74 | 69 6f 6e 20 64 31 5b 5d |Descript|ion d1[]|
|00004f80| 2c 44 65 73 63 72 69 70 | 74 69 6f 6e 20 64 32 5b |,Descrip|tion d2[|
|00004f90| 5d 2c 73 68 6f 72 74 20 | 66 6c 61 67 73 29 0d 2f |],short |flags)./|
|00004fa0| 2a 0d 43 6f 70 69 65 73 | 20 74 68 65 20 64 61 74 |*.Copies| the dat|
|00004fb0| 61 20 70 6f 69 6e 74 65 | 64 20 74 6f 20 62 79 20 |a pointe|d to by |
|00004fc0| 74 68 65 20 66 69 72 73 | 74 20 44 65 73 63 72 69 |the firs|t Descri|
|00004fd0| 70 74 69 6f 6e 20 61 72 | 72 61 79 2c 20 6f 76 65 |ption ar|ray, ove|
|00004fe0| 72 77 72 69 74 69 6e 67 | 20 74 68 65 20 64 61 74 |rwriting| the dat|
|00004ff0| 61 0d 70 6f 69 6e 74 65 | 64 20 74 6f 20 62 79 20 |a.pointe|d to by |
|00005000| 74 68 65 20 73 65 63 6f | 6e 64 2e 20 52 65 74 75 |the seco|nd. Retu|
|00005010| 72 6e 73 20 30 20 69 66 | 20 73 75 63 63 65 73 73 |rns 0 if| success|
|00005020| 66 75 6c 2c 20 69 2e 65 | 2e 20 74 68 65 20 73 74 |ful, i.e|. the st|
|00005030| 72 75 63 74 73 20 61 72 | 65 20 6c 65 67 61 6c 20 |ructs ar|e legal |
|00005040| 61 6e 64 20 0d 74 68 65 | 20 74 79 70 65 73 20 61 |and .the| types a|
|00005050| 6e 64 20 6e 61 6d 65 73 | 20 61 72 65 20 63 6f 6e |nd names| are con|
|00005060| 73 69 73 74 65 6e 74 2c | 20 6e 6f 6e 7a 65 72 6f |sistent,| nonzero|
|00005070| 20 6f 74 68 65 72 77 69 | 73 65 2e 0d 2a 2f 0d 7b | otherwi|se..*/.{|
|00005080| 0d 09 69 6e 74 20 65 72 | 72 6f 72 3b 0d 09 0d 09 |..int er|ror;....|
|00005090| 66 6f 72 28 3b 64 31 2d | 3e 74 79 70 65 21 3d 30 |for(;d1-|>type!=0|
|000050a0| 20 26 26 20 64 32 2d 3e | 74 79 70 65 21 3d 30 3b | && d2->|type!=0;|
|000050b0| 64 31 2b 2b 2c 64 32 2b | 2b 29 7b 0d 09 09 65 72 |d1++,d2+|+){...er|
|000050c0| 72 6f 72 3d 43 6f 70 79 | 44 65 73 63 72 69 62 65 |ror=Copy|Describe|
|000050d0| 64 56 61 72 50 61 69 72 | 28 64 31 2c 64 32 2c 66 |dVarPair|(d1,d2,f|
|000050e0| 6c 61 67 73 29 3b 0d 09 | 09 69 66 28 65 72 72 6f |lags);..|.if(erro|
|000050f0| 72 29 72 65 74 75 72 6e | 20 65 72 72 6f 72 3b 0d |r)return| error;.|
|00005100| 09 7d 0d 09 72 65 74 75 | 72 6e 20 30 3b 0d 7d 0d |.}..retu|rn 0;.}.|
|00005110| 0d 6c 6f 6e 67 20 45 6c | 65 6d 65 6e 74 73 28 44 |.long El|ements(D|
|00005120| 65 73 63 72 69 70 74 69 | 6f 6e 20 2a 64 29 0d 7b |escripti|on *d).{|
|00005130| 0d 09 6c 6f 6e 67 20 65 | 6c 65 6d 65 6e 74 73 3d |..long e|lements=|
|00005140| 31 3b 0d 09 69 6e 74 20 | 69 3b 0d 0d 09 66 6f 72 |1;..int |i;...for|
|00005150| 28 69 3d 30 3b 69 3c 41 | 53 53 49 47 4e 5f 44 49 |(i=0;i<A|SSIGN_DI|
|00005160| 4d 53 20 26 26 20 64 2d | 3e 64 69 6d 5b 69 5d 3e |MS && d-|>dim[i]>|
|00005170| 30 3b 69 2b 2b 29 65 6c | 65 6d 65 6e 74 73 2a 3d |0;i++)el|ements*=|
|00005180| 64 2d 3e 64 69 6d 5b 69 | 5d 3b 0d 09 72 65 74 75 |d->dim[i|];..retu|
|00005190| 72 6e 20 65 6c 65 6d 65 | 6e 74 73 3b 0d 7d 0d 6c |rn eleme|nts;.}.l|
|000051a0| 6f 6e 67 20 44 69 6d 73 | 28 44 65 73 63 72 69 70 |ong Dims|(Descrip|
|000051b0| 74 69 6f 6e 20 2a 64 29 | 0d 7b 0d 09 69 6e 74 20 |tion *d)|.{..int |
|000051c0| 69 3b 0d 0d 09 66 6f 72 | 28 69 3d 30 3b 69 3c 41 |i;...for|(i=0;i<A|
|000051d0| 53 53 49 47 4e 5f 44 49 | 4d 53 20 26 26 20 64 2d |SSIGN_DI|MS && d-|
|000051e0| 3e 64 69 6d 5b 69 5d 3e | 30 3b 69 2b 2b 29 20 3b |>dim[i]>|0;i++) ;|
|000051f0| 0d 09 72 65 74 75 72 6e | 20 69 3b 0d 7d 0d 76 6f |..return| i;.}.vo|
|00005200| 69 64 20 2a 45 6c 65 6d | 65 6e 74 50 74 72 28 44 |id *Elem|entPtr(D|
|00005210| 65 73 63 72 69 70 74 69 | 6f 6e 20 2a 64 2c 6c 6f |escripti|on *d,lo|
|00005220| 6e 67 20 69 6e 64 65 78 | 29 0d 2f 2a 20 52 65 74 |ng index|)./* Ret|
|00005230| 75 72 6e 73 20 4e 55 4c | 4c 20 69 66 20 50 74 72 |urns NUL|L if Ptr|
|00005240| 54 79 70 65 20 61 72 72 | 61 79 20 6e 6f 74 20 61 |Type arr|ay not a|
|00005250| 6c 6c 6f 63 61 74 65 64 | 2e 20 2a 2f 0d 7b 0d 09 |llocated|. */.{..|
|00005260| 63 68 61 72 20 2a 70 74 | 72 3b 0d 09 0d 09 69 66 |char *pt|r;....if|
|00005270| 28 49 73 50 74 72 28 64 | 2d 3e 74 79 70 65 29 29 |(IsPtr(d|->type))|
|00005280| 7b 0d 09 09 61 73 73 65 | 72 74 28 64 2d 3e 70 74 |{...asse|rt(d->pt|
|00005290| 72 21 3d 4e 55 4c 4c 29 | 3b 0d 09 09 70 74 72 3d |r!=NULL)|;...ptr=|
|000052a0| 2a 28 76 6f 69 64 20 2a | 2a 29 64 2d 3e 70 74 72 |*(void *|*)d->ptr|
|000052b0| 3b 0d 09 7d 65 6c 73 65 | 20 70 74 72 3d 64 2d 3e |;..}else| ptr=d->|
|000052c0| 70 74 72 3b 0d 09 69 66 | 28 70 74 72 21 3d 4e 55 |ptr;..if|(ptr!=NU|
|000052d0| 4c 4c 20 26 26 20 64 2d | 3e 64 69 6d 5b 30 5d 3e |LL && d-|>dim[0]>|
|000052e0| 30 29 7b 0d 09 09 69 6e | 64 65 78 2b 3d 64 2d 3e |0){...in|dex+=d->|
|000052f0| 66 69 72 73 74 45 6c 65 | 6d 65 6e 74 3b 0d 09 09 |firstEle|ment;...|
|00005300| 70 74 72 2b 3d 69 6e 64 | 65 78 2a 74 79 70 65 53 |ptr+=ind|ex*typeS|
|00005310| 69 7a 65 5b 64 2d 3e 74 | 79 70 65 5d 3b 0d 09 7d |ize[d->t|ype];..}|
|00005320| 0d 09 72 65 74 75 72 6e | 20 70 74 72 3b 0d 7d 0d |..return| ptr;.}.|
|00005330| 63 68 61 72 20 2a 45 6c | 65 6d 65 6e 74 4e 61 6d |char *El|ementNam|
|00005340| 65 28 63 68 61 72 20 2a | 73 2c 44 65 73 63 72 69 |e(char *|s,Descri|
|00005350| 70 74 69 6f 6e 20 2a 64 | 2c 6c 6f 6e 67 20 69 6e |ption *d|,long in|
|00005360| 64 65 78 29 0d 7b 0d 09 | 6c 6f 6e 67 20 73 75 62 |dex).{..|long sub|
|00005370| 5b 41 53 53 49 47 4e 5f | 44 49 4d 53 5d 3b 0d 09 |[ASSIGN_|DIMS];..|
|00005380| 69 6e 74 20 69 3b 0d 09 | 0d 09 45 6c 65 6d 65 6e |int i;..|..Elemen|
|00005390| 74 53 75 62 73 63 72 69 | 70 74 28 64 2c 69 6e 64 |tSubscri|pt(d,ind|
|000053a0| 65 78 2c 73 75 62 29 3b | 0d 09 73 70 72 69 6e 74 |ex,sub);|..sprint|
|000053b0| 66 28 73 2c 22 25 73 22 | 2c 64 2d 3e 6e 61 6d 65 |f(s,"%s"|,d->name|
|000053c0| 29 3b 0d 09 66 6f 72 28 | 69 3d 30 3b 69 3c 44 69 |);..for(|i=0;i<Di|
|000053d0| 6d 73 28 64 29 3b 69 2b | 2b 29 73 70 72 69 6e 74 |ms(d);i+|+)sprint|
|000053e0| 66 28 73 2c 22 25 73 5b | 25 6c 64 5d 22 2c 73 2c |f(s,"%s[|%ld]",s,|
|000053f0| 73 75 62 5b 69 5d 29 3b | 0d 09 72 65 74 75 72 6e |sub[i]);|..return|
|00005400| 20 73 3b 0d 7d 0d 63 68 | 61 72 20 2a 44 65 73 63 | s;.}.ch|ar *Desc|
|00005410| 72 69 70 74 69 6f 6e 4e | 61 6d 65 44 69 6d 65 6e |riptionN|ameDimen|
|00005420| 73 69 6f 6e 73 28 44 65 | 73 63 72 69 70 74 69 6f |sions(De|scriptio|
|00005430| 6e 20 2a 64 29 3b 0d 63 | 68 61 72 20 2a 44 65 73 |n *d);.c|har *Des|
|00005440| 63 72 69 70 74 69 6f 6e | 4e 61 6d 65 44 69 6d 65 |cription|NameDime|
|00005450| 6e 73 69 6f 6e 73 28 44 | 65 73 63 72 69 70 74 69 |nsions(D|escripti|
|00005460| 6f 6e 20 2a 64 29 0d 7b | 0d 09 69 6e 74 20 69 3b |on *d).{|..int i;|
|00005470| 0d 09 73 74 61 74 69 63 | 20 63 68 61 72 20 73 5b |..static| char s[|
|00005480| 36 34 5d 3b 0d 09 0d 09 | 73 70 72 69 6e 74 66 28 |64];....|sprintf(|
|00005490| 73 2c 22 25 73 22 2c 64 | 2d 3e 6e 61 6d 65 29 3b |s,"%s",d|->name);|
|000054a0| 0d 09 66 6f 72 28 69 3d | 30 3b 64 2d 3e 64 69 6d |..for(i=|0;d->dim|
|000054b0| 5b 69 5d 3e 30 3b 69 2b | 2b 29 73 70 72 69 6e 74 |[i]>0;i+|+)sprint|
|000054c0| 66 28 73 2c 22 25 73 5b | 25 6c 64 5d 22 2c 73 2c |f(s,"%s[|%ld]",s,|
|000054d0| 64 2d 3e 64 69 6d 5b 69 | 5d 29 3b 0d 09 61 73 73 |d->dim[i|]);..ass|
|000054e0| 65 72 74 28 73 74 72 6c | 65 6e 28 73 29 3c 73 69 |ert(strl|en(s)<si|
|000054f0| 7a 65 6f 66 28 73 29 29 | 3b 0d 09 72 65 74 75 72 |zeof(s))|;..retur|
|00005500| 6e 20 73 3b 0d 7d 0d 76 | 6f 69 64 20 45 6c 65 6d |n s;.}.v|oid Elem|
|00005510| 65 6e 74 53 75 62 73 63 | 72 69 70 74 28 44 65 73 |entSubsc|ript(Des|
|00005520| 63 72 69 70 74 69 6f 6e | 20 2a 64 2c 6c 6f 6e 67 |cription| *d,long|
|00005530| 20 69 6e 64 65 78 2c 6c | 6f 6e 67 20 73 75 62 5b | index,l|ong sub[|
|00005540| 41 53 53 49 47 4e 5f 44 | 49 4d 53 5d 29 0d 7b 0d |ASSIGN_D|IMS]).{.|
|00005550| 09 69 6e 74 20 69 3b 0d | 0d 09 66 6f 72 28 69 3d |.int i;.|..for(i=|
|00005560| 30 3b 69 3c 41 53 53 49 | 47 4e 5f 44 49 4d 53 3b |0;i<ASSI|GN_DIMS;|
|00005570| 69 2b 2b 29 73 75 62 5b | 69 5d 3d 30 3b 0d 09 69 |i++)sub[|i]=0;..i|
|00005580| 66 28 44 69 6d 73 28 64 | 29 29 7b 0d 09 09 66 6f |f(Dims(d|)){...fo|
|00005590| 72 28 69 3d 44 69 6d 73 | 28 64 29 2d 31 3b 69 3e |r(i=Dims|(d)-1;i>|
|000055a0| 3d 30 3b 69 2d 2d 29 7b | 0d 09 09 09 73 75 62 5b |=0;i--){|....sub[|
|000055b0| 69 5d 3d 69 6e 64 65 78 | 25 64 2d 3e 64 69 6d 5b |i]=index|%d->dim[|
|000055c0| 69 5d 3b 0d 09 09 09 69 | 6e 64 65 78 2f 3d 64 2d |i];....i|ndex/=d-|
|000055d0| 3e 64 69 6d 5b 69 5d 3b | 0d 09 09 7d 0d 09 09 73 |>dim[i];|...}...s|
|000055e0| 75 62 5b 44 69 6d 73 28 | 64 29 2d 31 5d 2b 3d 64 |ub[Dims(|d)-1]+=d|
|000055f0| 2d 3e 66 69 72 73 74 45 | 6c 65 6d 65 6e 74 3b 0d |->firstE|lement;.|
|00005600| 09 7d 0d 7d 0d 6c 6f 6e | 67 20 45 6c 65 6d 65 6e |.}.}.lon|g Elemen|
|00005610| 74 49 6e 64 65 78 28 44 | 65 73 63 72 69 70 74 69 |tIndex(D|escripti|
|00005620| 6f 6e 20 2a 64 2c 6c 6f | 6e 67 20 73 75 62 5b 41 |on *d,lo|ng sub[A|
|00005630| 53 53 49 47 4e 5f 44 49 | 4d 53 5d 29 0d 7b 0d 09 |SSIGN_DI|MS]).{..|
|00005640| 69 6e 74 20 69 3b 0d 09 | 6c 6f 6e 67 20 69 6e 64 |int i;..|long ind|
|00005650| 65 78 3d 30 3b 0d 0d 09 | 69 66 28 44 69 6d 73 28 |ex=0;...|if(Dims(|
|00005660| 64 29 29 7b 0d 09 73 75 | 62 5b 44 69 6d 73 28 64 |d)){..su|b[Dims(d|
|00005670| 29 2d 31 5d 2d 3d 64 2d | 3e 66 69 72 73 74 45 6c |)-1]-=d-|>firstEl|
|00005680| 65 6d 65 6e 74 3b 0d 09 | 66 6f 72 28 69 3d 30 3b |ement;..|for(i=0;|
|00005690| 69 3c 44 69 6d 73 28 64 | 29 3b 69 2b 2b 29 7b 0d |i<Dims(d|);i++){.|
|000056a0| 09 09 69 6e 64 65 78 2a | 3d 64 2d 3e 64 69 6d 5b |..index*|=d->dim[|
|000056b0| 69 5d 3b 0d 09 09 69 6e | 64 65 78 2b 3d 73 75 62 |i];...in|dex+=sub|
|000056c0| 5b 69 5d 3b 0d 09 7d 0d | 09 73 75 62 5b 44 69 6d |[i];..}.|.sub[Dim|
|000056d0| 73 28 64 29 2d 31 5d 2b | 3d 64 2d 3e 66 69 72 73 |s(d)-1]+|=d->firs|
|000056e0| 74 45 6c 65 6d 65 6e 74 | 3b 0d 09 7d 0d 09 72 65 |tElement|;..}..re|
|000056f0| 74 75 72 6e 20 69 6e 64 | 65 78 3b 0d 7d 0d 69 6e |turn ind|ex;.}.in|
|00005700| 74 20 47 65 74 44 69 6d | 65 6e 73 69 6f 6e 73 28 |t GetDim|ensions(|
|00005710| 44 65 73 63 72 69 70 74 | 69 6f 6e 20 2a 64 2c 69 |Descript|ion *d,i|
|00005720| 6e 74 20 73 75 62 73 63 | 72 69 70 74 44 69 6d 73 |nt subsc|riptDims|
|00005730| 2c 6c 6f 6e 67 20 73 75 | 62 73 63 72 69 70 74 5b |,long su|bscript[|
|00005740| 41 53 53 49 47 4e 5f 44 | 49 4d 53 5d 2c 73 68 6f |ASSIGN_D|IMS],sho|
|00005750| 72 74 20 66 6c 61 67 73 | 29 0d 7b 0d 09 73 68 6f |rt flags|).{..sho|
|00005760| 72 74 20 69 3b 0d 09 0d | 09 66 6c 61 67 73 3b 09 |rt i;...|.flags;.|
|00005770| 2f 2a 20 64 67 70 3a 20 | 70 72 65 76 65 6e 74 20 |/* dgp: |prevent |
|00005780| 22 75 6e 75 73 65 64 20 | 61 72 67 75 6d 65 6e 74 |"unused |argument|
|00005790| 22 20 77 61 72 6e 69 6e | 67 20 2a 2f 0d 09 69 66 |" warnin|g */..if|
|000057a0| 28 64 2d 3e 73 69 7a 65 | 64 4f 6e 63 65 20 26 26 |(d->size|dOnce &&|
|000057b0| 20 44 69 6d 73 28 64 29 | 21 3d 73 75 62 73 63 72 | Dims(d)|!=subscr|
|000057c0| 69 70 74 44 69 6d 73 29 | 0d 09 09 72 65 74 75 72 |iptDims)|...retur|
|000057d0| 6e 20 61 73 73 69 67 6e | 49 6e 63 6f 6e 73 69 73 |n assign|Inconsis|
|000057e0| 74 65 6e 74 44 69 6d 65 | 6e 73 69 6f 6e 73 45 72 |tentDime|nsionsEr|
|000057f0| 72 6f 72 3b 0d 09 69 66 | 28 21 64 2d 3e 73 69 7a |ror;..if|(!d->siz|
|00005800| 65 64 29 7b 0d 09 09 66 | 6f 72 28 69 3d 30 3b 69 |ed){...f|or(i=0;i|
|00005810| 3c 73 75 62 73 63 72 69 | 70 74 44 69 6d 73 3b 69 |<subscri|ptDims;i|
|00005820| 2b 2b 29 0d 09 09 09 69 | 66 28 64 2d 3e 64 69 6d |++)....i|f(d->dim|
|00005830| 5b 69 5d 3c 73 75 62 73 | 63 72 69 70 74 5b 69 5d |[i]<subs|cript[i]|
|00005840| 2b 31 29 64 2d 3e 64 69 | 6d 5b 69 5d 3d 73 75 62 |+1)d->di|m[i]=sub|
|00005850| 73 63 72 69 70 74 5b 69 | 5d 2b 31 3b 0d 09 09 64 |script[i|]+1;...d|
|00005860| 2d 3e 73 69 7a 65 64 4f | 6e 63 65 3d 31 3b 0d 09 |->sizedO|nce=1;..|
|00005870| 7d 0d 09 72 65 74 75 72 | 6e 20 30 3b 0d 7d 0d 0d |}..retur|n 0;.}..|
|00005880| 69 6e 74 20 55 6e 65 71 | 75 61 6c 44 65 73 63 72 |int Uneq|ualDescr|
|00005890| 69 62 65 64 56 61 72 50 | 61 69 72 28 44 65 73 63 |ibedVarP|air(Desc|
|000058a0| 72 69 70 74 69 6f 6e 20 | 2a 64 31 2c 44 65 73 63 |ription |*d1,Desc|
|000058b0| 72 69 70 74 69 6f 6e 20 | 2a 64 32 2c 73 68 6f 72 |ription |*d2,shor|
|000058c0| 74 20 66 6c 61 67 73 29 | 0d 2f 2a 0d 43 6f 6d 70 |t flags)|./*.Comp|
|000058d0| 61 72 65 73 20 74 68 65 | 20 64 61 74 61 20 70 6f |ares the| data po|
|000058e0| 69 6e 74 65 64 20 74 6f | 20 62 79 20 74 68 65 20 |inted to| by the |
|000058f0| 74 77 6f 20 44 65 73 63 | 72 69 70 74 69 6f 6e 20 |two Desc|ription |
|00005900| 73 74 72 75 63 74 73 20 | 61 6e 64 20 72 65 74 75 |structs |and retu|
|00005910| 72 6e 73 20 74 72 75 65 | 20 69 66 20 74 68 65 0d |rns true| if the.|
|00005920| 73 74 72 75 63 74 73 20 | 61 72 65 20 6c 65 67 61 |structs |are lega|
|00005930| 6c 20 61 6e 64 20 74 68 | 65 20 64 61 74 61 20 61 |l and th|e data a|
|00005940| 72 65 20 65 71 75 61 6c | 2c 20 66 61 6c 73 65 20 |re equal|, false |
|00005950| 6f 74 68 65 72 77 69 73 | 65 2e 20 43 6f 6d 70 61 |otherwis|e. Compa|
|00005960| 72 69 73 6f 6e 20 6f 66 | 20 66 6c 6f 61 74 73 0d |rison of| floats.|
|00005970| 61 6e 64 20 64 6f 75 62 | 6c 65 73 20 61 6c 6c 6f |and doub|les allo|
|00005980| 77 73 20 61 20 74 6f 6c | 65 72 61 6e 63 65 20 6f |ws a tol|erance o|
|00005990| 66 20 2b 2f 2d 20 6f 6e | 65 20 70 61 72 74 20 69 |f +/- on|e part i|
|000059a0| 6e 20 61 20 6d 69 6c 6c | 69 6f 6e 2d 2d 62 65 63 |n a mill|ion--bec|
|000059b0| 61 75 73 65 20 63 6f 6e | 76 65 72 74 69 6e 67 0d |ause con|verting.|
|000059c0| 74 6f 20 61 6e 64 20 66 | 72 6f 6d 20 64 65 63 69 |to and f|rom deci|
|000059d0| 6d 61 6c 20 6d 61 79 20 | 6c 6f 73 65 20 73 6f 6d |mal may |lose som|
|000059e0| 65 20 70 72 65 63 69 73 | 69 6f 6e 2d 2d 61 6e 64 |e precis|ion--and|
|000059f0| 20 69 67 6e 6f 72 65 73 | 20 61 6e 79 20 4e 41 4e | ignores| any NAN|
|00005a00| 73 27 20 69 6e 64 69 63 | 65 73 20 28 4e 41 4e 30 |s' indic|es (NAN0|
|00005a10| 34 0d 76 73 20 4e 41 4e | 46 46 29 2d 2d 62 65 63 |4.vs NAN|FF)--bec|
|00005a20| 61 75 73 65 20 74 68 65 | 79 27 72 65 20 6e 6f 74 |ause the|y're not|
|00005a30| 20 70 72 65 73 65 72 76 | 65 64 2e 0d 2a 2f 0d 7b | preserv|ed..*/.{|
|00005a40| 0d 09 75 6e 73 69 67 6e | 65 64 20 63 68 61 72 20 |..unsign|ed char |
|00005a50| 2a 70 31 2c 2a 70 32 3b | 0d 09 6c 6f 6e 67 20 69 |*p1,*p2;|..long i|
|00005a60| 2c 73 69 7a 65 2c 65 6c | 65 6d 65 6e 74 73 3b 0d |,size,el|ements;.|
|00005a70| 09 69 6e 74 20 65 72 72 | 6f 72 3b 0d 09 64 6f 75 |.int err|or;..dou|
|00005a80| 62 6c 65 20 61 2c 62 2c | 65 3b 0d 09 73 74 61 74 |ble a,b,|e;..stat|
|00005a90| 69 63 20 63 6f 6e 73 74 | 20 63 68 61 72 20 68 65 |ic const| char he|
|00005aa0| 72 65 5b 5d 3d 22 55 6e | 65 71 75 61 6c 44 65 73 |re[]="Un|equalDes|
|00005ab0| 63 72 69 62 65 64 56 61 | 72 50 61 69 72 22 3b 0d |cribedVa|rPair";.|
|00005ac0| 09 63 68 61 72 20 6e 61 | 6d 65 5b 33 32 2b 31 36 |.char na|me[32+16|
|00005ad0| 2a 41 53 53 49 47 4e 5f | 44 49 4d 53 5d 3b 0d 09 |*ASSIGN_|DIMS];..|
|00005ae0| 0d 09 2f 2a 20 53 71 75 | 65 65 7a 65 20 73 70 61 |../* Squ|eeze spa|
|00005af0| 63 65 20 6f 75 74 20 6f | 66 20 6e 61 6d 65 73 20 |ce out o|f names |
|00005b00| 2a 2f 0d 09 65 72 72 6f | 72 3d 43 68 65 63 6b 41 |*/..erro|r=CheckA|
|00005b10| 44 65 73 63 72 69 70 74 | 69 6f 6e 28 64 31 2c 68 |Descript|ion(d1,h|
|00005b20| 65 72 65 2c 66 6c 61 67 | 73 29 3b 0d 09 69 66 28 |ere,flag|s);..if(|
|00005b30| 65 72 72 6f 72 3c 30 29 | 72 65 74 75 72 6e 20 65 |error<0)|return e|
|00005b40| 72 72 6f 72 3b 0d 09 65 | 72 72 6f 72 3d 43 68 65 |rror;..e|rror=Che|
|00005b50| 63 6b 41 44 65 73 63 72 | 69 70 74 69 6f 6e 28 64 |ckADescr|iption(d|
|00005b60| 32 2c 68 65 72 65 2c 66 | 6c 61 67 73 29 3b 0d 09 |2,here,f|lags);..|
|00005b70| 69 66 28 65 72 72 6f 72 | 3c 30 29 72 65 74 75 72 |if(error|<0)retur|
|00005b80| 6e 20 65 72 72 6f 72 3b | 0d 09 69 66 28 64 31 2d |n error;|..if(d1-|
|00005b90| 3e 74 79 70 65 21 3d 64 | 32 2d 3e 74 79 70 65 0d |>type!=d|2->type.|
|00005ba0| 09 09 7c 7c 20 21 73 74 | 72 65 71 28 64 31 2d 3e |..|| !st|req(d1->|
|00005bb0| 6e 61 6d 65 2c 64 32 2d | 3e 6e 61 6d 65 29 20 0d |name,d2-|>name) .|
|00005bc0| 09 09 7c 7c 20 64 31 2d | 3e 66 69 72 73 74 45 6c |..|| d1-|>firstEl|
|00005bd0| 65 6d 65 6e 74 21 3d 64 | 32 2d 3e 66 69 72 73 74 |ement!=d|2->first|
|00005be0| 45 6c 65 6d 65 6e 74 0d | 09 09 7c 7c 20 21 73 74 |Element.|..|| !st|
|00005bf0| 72 65 71 28 64 31 2d 3e | 63 6f 6d 6d 65 6e 74 2c |req(d1->|comment,|
|00005c00| 64 32 2d 3e 63 6f 6d 6d | 65 6e 74 29 29 0d 09 09 |d2->comm|ent))...|
|00005c10| 09 7b 65 72 72 6f 72 3d | 61 73 73 69 67 6e 49 6e |.{error=|assignIn|
|00005c20| 63 6f 6e 73 69 73 74 65 | 6e 74 44 65 73 63 72 69 |consiste|ntDescri|
|00005c30| 70 74 69 6f 6e 73 45 72 | 72 6f 72 3b 67 6f 74 6f |ptionsEr|ror;goto|
|00005c40| 20 64 6f 6e 65 3b 7d 0d | 09 66 6f 72 28 69 3d 30 | done;}.|.for(i=0|
|00005c50| 3b 69 3c 41 53 53 49 47 | 4e 5f 44 49 4d 53 3b 69 |;i<ASSIG|N_DIMS;i|
|00005c60| 2b 2b 29 69 66 28 64 31 | 2d 3e 64 69 6d 5b 69 5d |++)if(d1|->dim[i]|
|00005c70| 21 3d 64 32 2d 3e 64 69 | 6d 5b 69 5d 29 0d 09 09 |!=d2->di|m[i])...|
|00005c80| 7b 65 72 72 6f 72 3d 61 | 73 73 69 67 6e 49 6e 63 |{error=a|ssignInc|
|00005c90| 6f 6e 73 69 73 74 65 6e | 74 44 65 73 63 72 69 70 |onsisten|tDescrip|
|00005ca0| 74 69 6f 6e 73 45 72 72 | 6f 72 3b 67 6f 74 6f 20 |tionsErr|or;goto |
|00005cb0| 64 6f 6e 65 3b 7d 0d 09 | 70 31 3d 45 6c 65 6d 65 |done;}..|p1=Eleme|
|00005cc0| 6e 74 50 74 72 28 64 31 | 2c 30 29 3b 0d 09 70 32 |ntPtr(d1|,0);..p2|
|00005cd0| 3d 45 6c 65 6d 65 6e 74 | 50 74 72 28 64 32 2c 30 |=Element|Ptr(d2,0|
|00005ce0| 29 3b 0d 09 73 69 7a 65 | 3d 74 79 70 65 53 69 7a |);..size|=typeSiz|
|00005cf0| 65 5b 64 31 2d 3e 74 79 | 70 65 5d 3b 0d 09 65 6c |e[d1->ty|pe];..el|
|00005d00| 65 6d 65 6e 74 73 3d 45 | 6c 65 6d 65 6e 74 73 28 |ements=E|lements(|
|00005d10| 64 31 29 3b 0d 09 69 66 | 28 21 49 73 53 74 72 69 |d1);..if|(!IsStri|
|00005d20| 6e 67 28 64 31 2d 3e 74 | 79 70 65 29 29 7b 0d 09 |ng(d1->t|ype)){..|
|00005d30| 09 69 66 28 6d 65 6d 63 | 6d 70 28 70 31 2c 70 32 |.if(memc|mp(p1,p2|
|00005d40| 2c 73 69 7a 65 2a 65 6c | 65 6d 65 6e 74 73 29 21 |,size*el|ements)!|
|00005d50| 3d 30 29 7b 0d 09 09 09 | 69 66 28 21 49 73 46 6c |=0){....|if(!IsFl|
|00005d60| 6f 61 74 69 6e 67 28 64 | 31 2d 3e 74 79 70 65 29 |oating(d|1->type)|
|00005d70| 29 7b 65 72 72 6f 72 3d | 61 73 73 69 67 6e 55 6e |){error=|assignUn|
|00005d80| 65 71 75 61 6c 44 61 74 | 61 45 72 72 6f 72 3b 67 |equalDat|aError;g|
|00005d90| 6f 74 6f 20 64 6f 6e 65 | 3b 7d 0d 09 09 09 66 6f |oto done|;}....fo|
|00005da0| 72 28 69 3d 30 3b 69 3c | 65 6c 65 6d 65 6e 74 73 |r(i=0;i<|elements|
|00005db0| 3b 69 2b 2b 29 7b 0d 09 | 09 09 09 73 77 69 74 63 |;i++){..|...switc|
|00005dc0| 68 28 64 31 2d 3e 74 79 | 70 65 29 7b 0d 09 09 09 |h(d1->ty|pe){....|
|00005dd0| 09 63 61 73 65 20 66 6c | 6f 61 74 54 79 70 65 3a |.case fl|oatType:|
|00005de0| 0d 09 09 09 09 09 61 3d | 2a 28 66 6c 6f 61 74 20 |......a=|*(float |
|00005df0| 2a 29 70 31 3b 0d 09 09 | 09 09 09 62 3d 2a 28 66 |*)p1;...|...b=*(f|
|00005e00| 6c 6f 61 74 20 2a 29 70 | 32 3b 0d 09 09 09 09 09 |loat *)p|2;......|
|00005e10| 62 72 65 61 6b 3b 0d 09 | 09 09 09 23 69 66 20 53 |break;..|...#if S|
|00005e20| 48 4f 52 54 5f 44 4f 55 | 42 4c 45 5f 4f 4b 0d 09 |HORT_DOU|BLE_OK..|
|00005e30| 09 09 09 09 63 61 73 65 | 20 73 68 6f 72 74 44 6f |....case| shortDo|
|00005e40| 75 62 6c 65 54 79 70 65 | 3a 0d 09 09 09 09 09 09 |ubleType|:.......|
|00005e50| 61 3d 2a 28 73 68 6f 72 | 74 20 64 6f 75 62 6c 65 |a=*(shor|t double|
|00005e60| 20 2a 29 70 31 3b 0d 09 | 09 09 09 09 09 62 3d 2a | *)p1;..|.....b=*|
|00005e70| 28 73 68 6f 72 74 20 64 | 6f 75 62 6c 65 20 2a 29 |(short d|ouble *)|
|00005e80| 70 32 3b 0d 09 09 09 09 | 09 09 62 72 65 61 6b 3b |p2;.....|..break;|
|00005e90| 0d 09 09 09 09 23 65 6e | 64 69 66 0d 09 09 09 09 |.....#en|dif.....|
|00005ea0| 63 61 73 65 20 64 6f 75 | 62 6c 65 54 79 70 65 3a |case dou|bleType:|
|00005eb0| 0d 09 09 09 09 09 61 3d | 2a 28 64 6f 75 62 6c 65 |......a=|*(double|
|00005ec0| 20 2a 29 70 31 3b 0d 09 | 09 09 09 09 62 3d 2a 28 | *)p1;..|....b=*(|
|00005ed0| 64 6f 75 62 6c 65 20 2a | 29 70 32 3b 0d 09 09 09 |double *|)p2;....|
|00005ee0| 09 09 62 72 65 61 6b 3b | 0d 09 09 09 09 7d 0d 09 |..break;|.....}..|
|00005ef0| 09 09 09 2f 2a 20 20 63 | 6f 6d 70 61 72 65 20 64 |.../* c|ompare d|
|00005f00| 6f 75 62 6c 65 73 20 2a | 2f 0d 09 09 09 09 2f 2a |oubles *|/...../*|
|00005f10| 20 20 69 67 6e 6f 72 65 | 20 4e 61 4e 20 74 79 70 | ignore| NaN typ|
|00005f20| 65 2c 20 73 69 6e 63 65 | 20 69 74 27 73 20 6e 6f |e, since| it's no|
|00005f30| 74 20 70 72 65 73 65 72 | 76 65 64 20 2a 2f 0d 09 |t preser|ved */..|
|00005f40| 09 09 09 69 66 28 49 73 | 4e 61 6e 28 61 29 3d 3d |...if(Is|Nan(a)==|
|00005f50| 30 20 7c 7c 20 49 73 4e | 61 6e 28 62 29 3d 3d 30 |0 || IsN|an(b)==0|
|00005f60| 29 7b 0d 09 09 09 09 09 | 69 66 28 21 49 73 46 69 |){......|if(!IsFi|
|00005f70| 6e 69 74 65 28 61 29 20 | 7c 7c 20 21 49 73 46 69 |nite(a) ||| !IsFi|
|00005f80| 6e 69 74 65 28 62 29 29 | 0d 09 09 09 09 09 09 7b |nite(b))|.......{|
|00005f90| 65 72 72 6f 72 3d 61 73 | 73 69 67 6e 55 6e 65 71 |error=as|signUneq|
|00005fa0| 75 61 6c 44 61 74 61 45 | 72 72 6f 72 3b 67 6f 74 |ualDataE|rror;got|
|00005fb0| 6f 20 64 6f 6e 65 3b 7d | 0d 09 09 09 09 09 65 3d |o done;}|......e=|
|00005fc0| 61 2f 62 2d 31 2e 30 3b | 0d 09 09 09 09 09 69 66 |a/b-1.0;|......if|
|00005fd0| 28 65 3e 54 4f 4c 45 52 | 41 4e 43 45 20 7c 7c 20 |(e>TOLER|ANCE || |
|00005fe0| 65 3c 2d 54 4f 4c 45 52 | 41 4e 43 45 29 0d 09 09 |e<-TOLER|ANCE)...|
|00005ff0| 09 09 09 09 7b 65 72 72 | 6f 72 3d 61 73 73 69 67 |....{err|or=assig|
|00006000| 6e 55 6e 65 71 75 61 6c | 44 61 74 61 45 72 72 6f |nUnequal|DataErro|
|00006010| 72 3b 67 6f 74 6f 20 64 | 6f 6e 65 3b 7d 0d 09 09 |r;goto d|one;}...|
|00006020| 09 09 7d 0d 09 09 09 09 | 70 31 2b 3d 73 69 7a 65 |..}.....|p1+=size|
|00006030| 3b 0d 09 09 09 09 70 32 | 2b 3d 73 69 7a 65 3b 0d |;.....p2|+=size;.|
|00006040| 09 09 09 7d 0d 09 09 7d | 0d 09 7d 65 6c 73 65 20 |...}...}|..}else |
|00006050| 66 6f 72 28 69 3d 30 3b | 69 3c 65 6c 65 6d 65 6e |for(i=0;|i<elemen|
|00006060| 74 73 3b 69 2b 2b 29 7b | 09 09 09 09 09 09 09 2f |ts;i++){|......./|
|00006070| 2a 20 63 6f 6d 70 61 72 | 65 20 73 74 72 69 6e 67 |* compar|e string|
|00006080| 73 20 2a 2f 0d 09 09 69 | 66 28 2a 28 63 68 61 72 |s */...i|f(*(char|
|00006090| 20 2a 2a 29 70 31 21 3d | 2a 28 63 68 61 72 20 2a | **)p1!=|*(char *|
|000060a0| 2a 29 70 32 29 7b 0d 09 | 09 09 69 66 28 28 2a 28 |*)p2){..|..if((*(|
|000060b0| 63 68 61 72 20 2a 2a 29 | 70 31 3d 3d 4e 55 4c 4c |char **)|p1==NULL|
|000060c0| 29 20 7c 7c 20 28 2a 28 | 63 68 61 72 20 2a 2a 29 |) || (*(|char **)|
|000060d0| 70 32 3d 3d 4e 55 4c 4c | 29 0d 09 09 09 09 7c 7c |p2==NULL|).....|||
|000060e0| 20 21 73 74 72 65 71 28 | 2a 28 63 68 61 72 20 2a | !streq(|*(char *|
|000060f0| 2a 29 70 31 2c 2a 28 63 | 68 61 72 20 2a 2a 29 70 |*)p1,*(c|har **)p|
|00006100| 32 29 29 0d 09 09 09 09 | 09 7b 65 72 72 6f 72 3d |2)).....|.{error=|
|00006110| 61 73 73 69 67 6e 55 6e | 65 71 75 61 6c 44 61 74 |assignUn|equalDat|
|00006120| 61 45 72 72 6f 72 3b 67 | 6f 74 6f 20 64 6f 6e 65 |aError;g|oto done|
|00006130| 3b 7d 0d 09 09 7d 0d 09 | 09 70 31 2b 3d 73 69 7a |;}...}..|.p1+=siz|
|00006140| 65 3b 0d 09 09 70 32 2b | 3d 73 69 7a 65 3b 0d 09 |e;...p2+|=size;..|
|00006150| 7d 0d 09 72 65 74 75 72 | 6e 20 30 3b 0d 64 6f 6e |}..retur|n 0;.don|
|00006160| 65 3a 0d 09 69 66 28 21 | 28 66 6c 61 67 73 26 61 |e:..if(!|(flags&a|
|00006170| 73 73 69 67 6e 4e 6f 50 | 72 69 6e 74 66 45 78 69 |ssignNoP|rintfExi|
|00006180| 74 29 29 73 77 69 74 63 | 68 28 65 72 72 6f 72 29 |t))switc|h(error)|
|00006190| 7b 0d 09 63 61 73 65 20 | 61 73 73 69 67 6e 49 6e |{..case |assignIn|
|000061a0| 63 6f 6e 73 69 73 74 65 | 6e 74 44 65 73 63 72 69 |consiste|ntDescri|
|000061b0| 70 74 69 6f 6e 73 45 72 | 72 6f 72 3a 0d 09 09 50 |ptionsEr|ror:...P|
|000061c0| 72 69 6e 74 66 45 78 69 | 74 28 22 25 73 3a 20 74 |rintfExi|t("%s: t|
|000061d0| 68 65 20 74 77 6f 20 44 | 65 73 63 72 69 70 74 69 |he two D|escripti|
|000061e0| 6f 6e 73 20 6f 66 20 5c | 22 25 73 5c 22 20 61 72 |ons of \|"%s\" ar|
|000061f0| 65 20 69 6e 63 6f 6e 73 | 69 73 74 65 6e 74 2e 5c |e incons|istent.\|
|00006200| 6e 22 0d 09 09 09 2c 68 | 65 72 65 2c 64 31 2d 3e |n"....,h|ere,d1->|
|00006210| 6e 61 6d 65 29 3b 0d 09 | 63 61 73 65 20 61 73 73 |name);..|case ass|
|00006220| 69 67 6e 55 6e 65 71 75 | 61 6c 44 61 74 61 45 72 |ignUnequ|alDataEr|
|00006230| 72 6f 72 3a 0d 09 09 50 | 72 69 6e 74 66 45 78 69 |ror:...P|rintfExi|
|00006240| 74 28 22 25 73 3a 20 74 | 68 65 20 74 77 6f 20 69 |t("%s: t|he two i|
|00006250| 6e 73 74 61 6e 63 65 73 | 20 6f 66 20 5c 22 25 73 |nstances| of \"%s|
|00006260| 5c 22 20 68 61 76 65 20 | 73 69 67 6e 69 66 69 63 |\" have |signific|
|00006270| 61 6e 74 6c 79 20 64 69 | 66 66 65 72 65 6e 74 20 |antly di|fferent |
|00006280| 76 61 6c 75 65 73 2e 5c | 6e 22 0d 09 09 09 2c 68 |values.\|n"....,h|
|00006290| 65 72 65 2c 45 6c 65 6d | 65 6e 74 4e 61 6d 65 28 |ere,Elem|entName(|
|000062a0| 6e 61 6d 65 2c 64 31 2c | 69 29 29 3b 0d 09 7d 0d |name,d1,|i));..}.|
|000062b0| 09 72 65 74 75 72 6e 20 | 65 72 72 6f 72 3b 0d 7d |.return |error;.}|
|000062c0| 0d 0d 69 6e 74 20 43 6f | 70 79 44 65 73 63 72 69 |..int Co|pyDescri|
|000062d0| 62 65 64 56 61 72 50 61 | 69 72 28 44 65 73 63 72 |bedVarPa|ir(Descr|
|000062e0| 69 70 74 69 6f 6e 20 2a | 64 31 2c 44 65 73 63 72 |iption *|d1,Descr|
|000062f0| 69 70 74 69 6f 6e 20 2a | 64 32 2c 73 68 6f 72 74 |iption *|d2,short|
|00006300| 20 66 6c 61 67 73 29 0d | 2f 2a 0d 43 6f 70 69 65 | flags).|/*.Copie|
|00006310| 73 20 74 68 65 20 64 61 | 74 61 20 70 6f 69 6e 74 |s the da|ta point|
|00006320| 65 64 20 74 6f 20 62 79 | 20 74 68 65 20 66 69 72 |ed to by| the fir|
|00006330| 73 74 20 44 65 73 63 72 | 69 70 74 69 6f 6e 20 73 |st Descr|iption s|
|00006340| 74 72 75 63 74 2c 20 6f | 76 65 72 77 72 69 74 69 |truct, o|verwriti|
|00006350| 6e 67 20 74 68 65 0d 64 | 61 74 61 20 70 6f 69 6e |ng the.d|ata poin|
|00006360| 74 65 64 20 74 6f 20 62 | 79 20 74 68 65 20 73 65 |ted to b|y the se|
|00006370| 63 6f 6e 64 20 73 74 72 | 75 63 74 2e 20 52 65 74 |cond str|uct. Ret|
|00006380| 75 72 6e 73 20 30 20 69 | 66 20 73 75 63 63 65 73 |urns 0 i|f succes|
|00006390| 73 66 75 6c 2c 20 69 2e | 65 2e 20 74 68 65 20 73 |sful, i.|e. the s|
|000063a0| 74 72 75 63 74 73 20 0d | 61 72 65 20 6c 65 67 61 |tructs .|are lega|
|000063b0| 6c 20 61 6e 64 20 74 68 | 65 20 74 79 70 65 73 20 |l and th|e types |
|000063c0| 61 6e 64 20 6e 61 6d 65 | 73 20 61 72 65 20 63 6f |and name|s are co|
|000063d0| 6e 73 69 73 74 65 6e 74 | 2c 20 6e 6f 6e 7a 65 72 |nsistent|, nonzer|
|000063e0| 6f 20 6f 74 68 65 72 77 | 69 73 65 2e 20 0d 2a 2f |o otherw|ise. .*/|
|000063f0| 0d 7b 0d 09 75 6e 73 69 | 67 6e 65 64 20 63 68 61 |.{..unsi|gned cha|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.